Whenever the Messenger of Allah ﷺ retired to his bed, he would say, "Praise be to Allah who has fed us, given us drink, sufficed us, and provided us shelter. How many there are who have none to suffice them and none to shelter them."
أن رسول الله ﷺ كان إذا أوى إلى فراشه قال: الحمد لله الذي أطعمنا وسقانا وكفانا وآوانا، فكم ممن لا كافي له ولا مؤوي.
Muslim narrated it in the Book of Remembrance and Supplication (64:2715) from Abu Bakr bin Abu Shayba, who said, Yazid bin Harun narrated to us, from Hammad bin Salama, from Thabit, from Anas, who said, then he mentioned it.