رِيَاضُ الصَّالِحِينَ
Riyad as-Salihin 816
The Book of the Etiquette of Sleeping, Lying and Sitting etc
What is to be said at the time of Sleeping
وَعَنْ حُذَيْفَةَ رضى اللَّه عَنْهُ قَالَ:كَانَ النَّبِيُّ صَلَّى اللَّه عَلَيْهِ وَسَلَّمَ إِذَا أَخَذَ مَضْجَعَهُ مِنَ اللَّيْلِ وَضَعَ يَدَهُ تَحْتَ خَدِّهِ، ثُمَّ يَقُولُ: "اللَّهُمَّ بِاسْمِكَ أَمُوتُ وَأَحْيَا" وَإِذَا اسْتَيْقَظَ قَالَ: "الْحَمْدُ لِلَّهِ الَّذِي أَحْيَانَا بَعْدَ مَا أَمَاتَنَا وَإِلَيْهِ النُّشُورُ" ((رَوَاهُ الْبُخَارِيّ)).
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].
Riyad as-Salihin, 816