Sahih Muslim 2710 c
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
اللَّهُمَّ أَسْلَمْتُ نَفْسِي إِلَيْكَ وَوَجَّهْتُ وَجْهِي إِلَيْكَ وَأَلْجَأْتُ ظَهْرِي إِلَيْكَ وَفَوَّضْتُ أَمْرِي إِلَيْكَ رَغْبَةً وَرَهْبَةً إِلَيْكَ لاَ مَلْجَأَ وَلاَ مَنْجَا مِنْكَ إِلاَّ إِلَيْكَ آمَنْتُ بِكِتَابِكَ الَّذِي أَنْزَلْتَ وَبِرَسُولِكَ الَّذِي أَرْسَلْتَ . فَإِنْ مَاتَ مَاتَ عَلَى الْفِطْرَةِ "
Al-Bara' b. 'Azib reported that Allah's Messenger (ﷺ) commanded a person (in these words):
When you go to bed during night, you should say:" O Allah, I surrender myself to You and entrust my affair to You, with hope in You and fear of You. There is no resort and no deliverer (from hardship but You). I affirm my faith in the Book which You revealed and in the Messengers whom You sent." If you die in this state you would die on Fitra, and Ibn Bashshdr did not make a mention of" night" in this hadith.
Full reference and source
Sahih Muslim 2710 c In-book : Book 48, Hadith 77 USC-MSA web (English) : Book 35, Hadith 6546 (deprecated)
View source on Sunnah.com (opens in a new tab)