It is narrated from Sayyiduna Abu al-Azhar al-Anmari (may Allah be pleased with him) that when the Messenger of Allah (peace and blessings be upon him) lay down on his bed at night, he would say: "Bismillahi wada'tu janbi, Allahummaghfir li dhanbi, wa akhsi' shaytani, wa fukka rihani, wa thaqqil mizani (In the name of Allah I lay down my side. O Allah, forgive me my sin, drive away my devil, free my pledge and make my scale heavy)."
Hadith Referenceالمعجم الكبير للطبراني / مسند من يعرف بالكنى / 18963