It has been narrated on the authority of our lady Aisha (may Allah be pleased with her) that she said:
“O Messenger of Allah, are the martyrs only those who are killed in the path of Allah?” He said,
“O Aisha, then the martyrs of my community would be little! Whoever says twenty-five times in a day, ‘O Allah, bless us in our death and after our death,’
اللهم بارك لنا في الموت وفيما بعد الموت
and then dies on his bed, Allah will give him the reward of a martyr.”
– Narrated by al-Tabarani in al-Awsat, and quoted by al-Suyuti in his book on the different causes of martyrdom.
Another narration quoted by al-Ghazali in the Ihya and al-Qurtubi in al-Tadhikra states that anyone who remembers death more than twenty times in a day and night will be raised among the martyrs.
Shaykh Ahmad ibn Idris and shaykh Salih al-Ja’fari (may Allah be pleased with them) recommended that this du’a be repeated 40 times after the Sunna prayer before Fajr. It could be repeated when one is implementing the sunna of lying down on one’s right side during this time, or after it.