Suhayl reported,

Abu Salih used to instruct us that whenever one of us intended to sleep, he should lie on his right side and then say, "O Allah, Lord of the heavens, Lord of the earth, and Lord of the Mighty Throne, our Lord and Lord of everything, Splitter of the grain and the date-stone, Revealer of the Torah, the Gospel, and the Criterion, I seek refuge in You from the evil of every creature whose forelock You hold. O Allah, You are the First, so there is nothing before You. You are the Last, so there is nothing after You. You are the Manifest, so there is nothing above You. You are the Hidden, so there is nothing beyond You. Settle our debts for us and free us from poverty."He used to narrate this from Abu Hurairah from the Prophet ﷺ.

Muslim 6889

Sahih

حدثني زهير بن حرب حدثنا جرير

عن سهيل قال

كان أبو صالح يأمرنا إذا أراد أحدنا أن ينام أن يضطجع على شقه الأيمن ثم يقول اللهم رب السماوات ورب الأرض ورب العرش العظيم ربنا ورب كل شيء فالق الحب والنوى ومنزل التوراة والإنجيل والفرقان أعوذ بك من شر كل شيء أنت آخذ بناصيته اللهم أنت الأول فليس قبلك شيء وأنت الآخر فليس بعدك شيء وأنت الظاهر فليس فوقك شيء وأنت الباطن فليس دونك شيء اقض عنا الدين وأغننا من الفقر وكان يروي ذلك عن أبي هريرة عن النبي ﷺ

مسلم 6889صحيح
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 6889
Muslim 6889