The Book Pertaining to the Remembrance of Allah, Supplication, Repentance and Seeking Forgiveness
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا يَزِيدُ بْنُ هَارُونَ، عَنْ حَمَّادِ بْنِ سَلَمَةَ، عَنْ ثَابِتٍ، عَنْ أَنَسٍ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم كَانَ إِذَا أَوَى إِلَى فِرَاشِهِ قَالَ " الْحَمْدُ لِلَّهِ الَّذِي أَطْعَمَنَا وَسَقَانَا وَكَفَانَا وَآوَانَا فَكَمْ مِمَّنْ لاَ كَافِيَ لَهُ وَلاَ مُئْوِيَ " .Anas reported Allah's Messenger (ﷺ) as saying:When you go to bed, say:" Praise is due to Allah Who fed us, provided us drink, sufficed us and provided us with shelter, for many a people there is none to suffice and none to provide shelter
From Sahih Muslim, whose reports the scholars accept as authentic.