The Messenger of Allah ﷺ used to say when he settled into his bed, "Praise be to Allah who has sufficed me, sheltered me, fed me, and given me drink. Praise be to Him who has favored me and shown me grace. Praise be to Him who has given me generously. Praise be to Allah in every state. O Allah, Lord of everything, Owner of everything, God of everything, to You belongs everything. I seek refuge in You from the Fire."
حدثنا عبد الصمد حدثنا أبي حدثنا حسين يعني المعلم عن ابن بريدة
أن رسول الله ﷺ كان يقول إذا تبوأ مضجعه قال الحمد لله الذي كفاني وآواني وأطعمني وسقاني والذي من علي وأفضل والذي أعطاني فأجزل الحمد لله على كل حال اللهم رب كل شيء وملك كل شيء وإله كل شيء ولك كل شيء أعوذ بك من النار
Its isnad is sahih. Husayn Muallim is Ibn Zakwan. Ibn Burayda is Abdullah bin Burayda, and it occurs in H as "from Abu Burayda," which is a clear printing error. The hadith was narrated by Abu Dawud, 4:473, from Ali bin Muslim, from Abdul-Samad, with this isnad. Munziri said, "Nasai also transmitted it." But I did not find it in Nasai, so perhaps it is in Sunan al-Kubra. However, Ibn Sunni narrated it in Amal al-Yawm wal-Layla, number 717, from Abu Abdul-Rahman, who is Nasai, from Amr bin Yazid, who is Jarmi Basri, from Abdul-Samad, with this isnad.In Majma al-Zawaid, 10:123, there is an abridged hadith similar to this one, from Burayda, as a marfu narration. He attributed it to Bazzar and said, "It contains Yahya bin Kathir Abu Nadr, and he is daif."His statement, "and the sovereign of everything," appears in a copy in the margin of M as "and the owner."