Al-Adab Al-Mufrad, Book 50, Hadith 1205 (In-Book) ⓘ
Hudhayfa said, "When the Prophet, may Allah bless him and grant him peace, wanted to go to sleep, he said, 'By Your Name, O Allah, I die and live.' When he woke up, he said, 'Praise be to Allah who gave us life after He made us die, and to Him is the gathering.'"
حَدَّثَنَا قَبِيصَةُ، وَأَبُو نُعَيْمٍ، قَالاَ: حَدَّثَنَا سُفْيَانُ، عَنْ عَبْدِ الْمَلِكِ بْنِ عُمَيْرٍ، عَنْ رِبْعِيِّ بْنِ حِرَاشٍ، عَنْ حُذَيْفَةَ قَالَ: كَانَ النَّبِيُّ صلى الله عليه وسلم إِذَا أَرَادَ أَنْ يَنَامَ قَالَ: بِاسْمِكَ اللَّهُمَّ أَمُوتُ وَأَحْيَا، وَإِذَا اسْتَيْقَظَ مِنْ مَنَامِهِ قَالَ: الْحَمْدُ لِلَّهِ الَّذِي أَحْيَانَا بَعْدَ مَا أَمَاتَنَا وَإِلَيْهِ النُّشُورُ.
also referenced under: Hadith 1205 (Reference) & Book 50, Hadith 1205 (English)