Sahih al-Bukhari 247
Al-Barāʾ ibn ʿĀzib narrated that the Prophet (saw) said: ‘Before retiring to bed, perform ablution as you would for the Prayer, then lie on your right side and supplicate: “O Allāh, I wholly submit to You, entrust all my affairs to You, and rely on You with love and fear. There is no refuge or sanctuary from You, except in You. O Allāh! I have believed in Your Book which You revealed and in Your Prophet (saw) whom You sent.” If you die that night, you will die in a natural state [as a Muslim], so make these the last words that you utter.’
Al-Barāʾ said: ‘I recited this to the Prophet (saw) and when I reached the words, “O Allāh! I have believed in Your Book which You revealed”, I then said, “And in Your Messenger.” He said: “No, [say], “Your Prophet whom You sent”.’
Translation: Ahmadiyya Muslim Jamaat
Book 75: The superiority of a person who sleeps with ablution.