Narrated Hudhaifa
When the Prophet (ﷺ) went to bed, he would say: "Bismika amutu wa ahya." and when he got up he would say:" Al-hamdu li l-lahil-ladhi ahyana ba'da ma amatana wa ilaihin-nushur."
Narrated Al-Bara bin `Azib
That the Prophet (ﷺ) advised a man, saying, "If you intend to lie down (i.e. go to bed), say, 'Allahumma aslamtu nafsi ilaika wa fauwadtu `Amri ilaika, wa wajjahtu wajhi ilaika wa alja'tu zahri ilaika, reghbatan wa rahbatan ilaika. La malja'a wa la manja minka illa ilaika. Amantu bikitabikal-ladhi anzalta; wa nabiyyikalladhi arsalta.' And if you should die then (after reciting this before going to bed) you will die on the religion of Islam"