Narrated Al-Bara' bin `Azib:
Allah's Messenger (ﷺ) said, "O so-and-so, whenever you go to your bed (for sleeping) say, 'O Allah! I have surrendered myself over to you and have turned my face towards You, and leave all my affairs to You and depend on You and put my trust in You expecting Your reward and fearing Your punishment. There is neither fleeing from You nor refuge but with You. I believe in the Book (Qur'an) which You have revealed and in Your Prophet (Muhammad) whom You have sent.' If you then die on that night, then you will die as a Muslim, and if you wake alive in the morning then you will receive the reward." Bukhari
" يَا فُلاَنُ إِذَا أَوَيْتَ إِلَى فِرَاشِكَ فَقُلِ اللَّهُمَّ أَسْلَمْتُ نَفْسِي إِلَيْكَ، وَوَجَّهْتُ وَجْهِي إِلَيْكَ وَفَوَّضْتُ أَمْرِي إِلَيْكَ، وَأَلْجَأْتُ ظَهْرِي إِلَيْكَ، رَغْبَةً وَرَهْبَةً إِلَيْكَ، لاَ مَلْجَأَ وَلاَ مَنْجَا مِنْكَ إِلاَّ إِلَيْكَ، آمَنْتُ بِكِتَابِكَ الَّذِي أَنْزَلْتَ، وَبِنَبِيِّكَ الَّذِي أَرْسَلْتَ. فَإِنَّكَ إِنْ مُتَّ فِي لَيْلَتِكَ مُتَّ عَلَى الْفِطْرَةِ، وَإِنْ أَصْبَحْتَ أَصَبْتَ أَجْرًا ".