Ibn Umar reported: When the Messenger of Allah, peace and blessings be upon him, would lie down on his side for sleep, he would say, “All praise is due to Allah, who has sufficed me, protected me, fed me, and given me drink, who has been favorable to me and who has given to me lavishly. All praise is due to Allah in every circumstance. O Allah, Lord of all things, their Sovereign, and God of all things, I seek refuge in You from the Hellfire.”
Source: Sunan Abī Dāwūd 5058
Grade: Sahih (authentic) according to Al-Nawawi
عَنْ ابْنِ عُمَرَ أَنَّهُ حَدَّثَهُ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ كَانَ يَقُولُ إِذَا أَخَذَ مَضْجَعَهُ الْحَمْدُ لِلَّهِ الَّذِي كَفَانِي وَآوَانِي وَأَطْعَمَنِي وَسَقَانِي وَالَّذِي مَنَّ عَلَيَّ فَأَفْضَلَ وَالَّذِي أَعْطَانِي فَأَجْزَلَ الْحَمْدُ لِلَّهِ عَلَى كُلِّ حَالٍ اللَّهُمَّ رَبَّ كُلِّ شَيْءٍ وَمَلِيكَهُ وَإِلَهَ كُلِّ شَيْءٍ أَعُوذُ بِكَ مِنْ النَّارِ
5058 سنن أبي داود أبواب النوم باب ما يقال عند النوم
126 المحدث النووي خلاصة حكم المحدث إسناده صحيح في الأذكار