Riyad as-Salihin, Book 5, Hadith 817 (In-Book)

Hudhaifah (May Allah be pleased with him) reported: Whenever the Prophet lay down for sleep at night, he would place his (right) hand under his (right) cheek and supplicate: "Allahumma bismika amutu wa ahya [O Allah, with Your Name will I die and live (wake up)]." And when he woke up, he would supplicate: "Al-hamdu lillahil-ladhi ahyana ba'da ma amatana, wa ilaihin-nushur (All praise is due to Allah, Who has brought us back to life after He has caused us to die, and to Him is the return)."[Al-Bukhari].

وعن حذيفة رضى الله عنه قال‏:‏كان النبي صلى الله عليه وسلم إذا أخذ مضجعه من الليل وضع يده تحت خده، ثم يقول‏:‏ ‏"‏اللهم باسمك أموت وأحيا‏"‏ وإذا استيقظ قال‏:‏ ‏"‏الحمد لله الذي أحيانا بعد ما أماتنا وإليه النشور‏"‏ ‏.‏

sunnah.com