Abu Hurairah reported,

The Messenger of Allah ﷺ used to instruct us that when one of us lies down to sleep, he should say, "O Allah, Lord of the heavens and Lord of the earths, our Lord and Lord of everything, Splitter of the grain and the date-stone, Revealer of the Torah, the Gospel, and the Quran, I seek refuge in You from the evil of every evil thing whose forelock You hold. 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 my debt for me and free me from poverty."

Tirmidhi 3400

Sahih

حدثنا عبد الله بن عبد الرحمن أخبرنا عمرو بن عون أخبرنا خالد بن عبد الله عن سهيل عن أبيه

عن أبي هريرة رضي الله عنه قال

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

الترمذي 3400صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Supplications
Chapter
From it, in the supplication "O Allah, Lord of the heavens and Lord of the earths"
Numbering
Darussalam 3400
Tirmidhi 3400