«كان إذا أخذ مضجعه من الليل وضع يده تحت خده ثم يقول: باسمك اللهم أحيا وباسمك أموت وإذا استيقظ قال: الحمد لله الذي أحيانا بعد ما أماتنا وإليه النشور»
It was the practice of the Prophet (peace and blessings be upon him):
"When he (peace and blessings be upon him) lay down on his bed at night, he would place his hand under his cheek, then say: 'Bismika Allahumma ahya wa bismika amut' (O Allah, in Your name I live and in Your name I die). And when he woke up, he would say: 'Al-hamdu lillahil-ladhi ahyana ba'da ma amatana wa ilayhin-nushur' (All praise is for Allah who gave us life after He had caused us to die, and to Him is the rising)."
Hadith Referenceصحیح الجامع الصغیر / حرف الكاف / 4650
Hadith Gradingالألبانی:صحيح
Hadith Takhrij[حم م ن] عن البراء [حم خ ٤] عن حذيفة [حم ق] عن أبي ذر. مختصر مسلم ١٨٩٧، صحيح الكلم ٢٥.