What you say at a sickbed is being answered
Umm Salama was told why the words matter there in particular.
قُولِي اللَّهُمَّ اغْفِرْ لِي وَلَهُ وَأَعْقِبْنِي مِنْهُ عُقْبَى حَسَنَةً
Allāhumma-ghfir lī wa lahu wa aʿqibnī minhu ʿuqbā ḥasanah.
“O Allah, forgive me and him, and give me a good outcome after him.”
When you visit the sick or the dying, say good, because the angels say amen to whatever you say.
The full narration
Umm Salama reported Allah's Messenger (ﷺ) as saying:Whenever you visit the sick or the dead, supplicate for good because angels say" Amen" to whatever you say. She added: When Abu Salama died, I went to the Messenger of Allah (ﷺ) and said: Messenger of Allah, Abu Salama has died. He told me to recite:" O Allah! forgive me and him (Abu Salama) and give me a better substitute than he." So I said (this), and Allah gave me in exchange Muhammad, who is better for me than him (Abu Salama)
Source
Ṣaḥīḥ Muslim · 2129
- Agreed upon as authentic (al-Bukhārī / Muslim)