Bara bin Azib reported,

The Messenger of Allah ﷺ said, "When you go to your bed, perform ablution as you would for prayer, then lie down on your right side and say, 'O Allah, I submit my face to You, entrust my affair to You, and lay my back to rest with You, in hope of You and in fear of You. There is no refuge or escape from You except to You. I believe in Your Book which You have revealed and in Your Prophet whom You have sent.' If you die during that night, you will die upon the natural state of faith."The narrator said, I repeated the words back to memorize them, but I said, "I believe in Your Messenger whom You have sent."He said, "Say, 'I believe in Your Prophet whom You have sent.'"He said, This is a hasan sahih hadith, and it has been narrated through more than one route from al-Bara. We do not know of any narration that mentions ablution except in this hadith.

Tirmidhi 3574

Sahih

حدثنا سفيان بن وكيع حدثنا جرير عن منصور عن سعد بن عبيدة ح

دثني البراء

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

الترمذي 3574صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Supplications
Chapter
Supplication for sleep
Numbering
Darussalam 3574
Tirmidhi 3574