Anas bin Malik reported,

The Messenger of Allah ﷺ, whenever he retired to his bed, would say, "Praise be to Allah who has fed us, given us drink, sufficed us, and provided us with shelter. How many there are who have no one to suffice them and no one to shelter them."

Muslim 6894

Sahih

حدثنا أبو بكر بن أبي شيبة حدثنا يزيد بن هارون عن حماد بن سلمة عن ثابت

عن أنس

أن رسول الله ﷺ كان إذا أوى إلى فراشه قال الحمد لله الذي أطعمنا وسقانا وكفانا وآوانا فكم ممن لا كافي له ولا مؤوي

مسلم 6894صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Remembrance, supplication, Tawba, and seeking forgiveness
Chapter
What to say when sleeping and lying down
Numbering
Darussalam 6894
Muslim 6894