When the Prophet (may Allah's peace and blessings be upon him) went to bed, he would say this Dhikr in which he would thank Allah for providing him with food and drink. Were it not for Allah, the Almighty,, one would not have access to food and drink, so praise is due to Allah for that. Also, the Prophet would thank Allah for facilitating matters for him, securing him provisions, as well as giving him a place to shelter him, given that many people have no means of sustenance or shelter. So, it is recommended to say this Dhikr when going to bed.
كنوز رياض الصالحين, بإشراف حمد العمار, دار كنوز إشبيليا, الطبعة الأولى, 1430ه. نزهة المتقين شرح رياض الصالحين، نشر: مؤسسة الرسالة، الطبعة: الرابعة عشر، 1407ه 1987م. بهجة الناظرين شرح رياض الصالحين، للهلالي، نشر: دار ابن الجوزي. صحيح مسلم، تحقيق: محمد فؤاد عبد الباقي، نشر: دار إحياء التراث العربي – بيروت.