Sunan Ibn Majah 3876
It was narrated from Bara' bin 'Azib that :
the Prophet ﷺ said to a man: "When you go to lay down, or go to your bed, say: Allahumma aslamtu wajhi ilayka, wa al-ja'tu zahri ilayka, wa fawwadtu amri ilayka, raghbatan wa rahbatan ilayka, la malja'a wa la manja'a minka illa ilayka, amantu bi kitabikal-ladhi anzalta, wa nabiyyikal arsalta [O Allah, I have submitted my face (i.e., myself) to You, and I am under Your command (i.e., I depend upon You in all my affairs), and I put my trust in You, hoping for Your reward and fearing Your punishment. There is no fleeing from You and no refuge from You except with You. I believe in Your Book that You have revealed and in Your Prophet whom You have sent).' Then if you die that night, you will die in a state of the Fitrah (nature), and if you wake in the morning you will wake with a great deal of good."
حَدَّثَنَا عَلِيُّ بْنُ مُحَمَّدٍ، حَدَّثَنَا وَكِيعٌ، حَدَّثَنَا سُفْيَانُ، عَنْ أَبِي إِسْحَاقَ، عَنِ الْبَرَاءِ بْنِ عَازِبٍ، أَنَّ النَّبِيَّ ﷺ قَالَ لِرَجُلٍ " إِذَا أَخَذْتَ مَضْجَعَكَ أَوْ أَوَيْتَ إِلَى فِرَاشِكَ فَقُلِ اللَّهُمَّ أَسْلَمْتُ وَجْهِي إِلَيْكَ وَأَلْجَأْتُ ظَهْرِي إِلَيْكَ وَفَوَّضْتُ أَمْرِي إِلَيْكَ رَغْبَةً وَرَهْبَةً إِلَيْكَ لاَ مَلْجَأَ وَلاَ مَنْجَى مِنْكَ إِلاَّ إِلَيْكَ آمَنْتُ بِكِتَابِكَ الَّذِي أَنْزَلْتَ وَنَبِيِّكَ الَّذِي أَرْسَلْتَ فَإِنْ مِتَّ مِنْ لَيْلَتِكَ مِتَّ عَلَى الْفِطْرَةِ وَإِنْ أَصْبَحْتَ أَصْبَحْتَ وَقَدْ أَصَبْتَ خَيْرًا كَثِيرًا " .