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."
When the Prophet (ﷺ) went to bed at night, he would put his hand under his cheek and then say, "Allahumma bismika amutu wa ahya," and when he got up, he would say, "Al-Hamdu lil-lahi al-ladhi ahyana ba'da ma amatana, wa ilaihi an-nushur."
Whenever the Prophet (ﷺ) intended to go to bed, he would recite: "Bismika Allahumma amutu wa ahya (With Your name, O Allah, I die and I live)." And when he woke up from his sleep, he would say: "Al-hamdu lil-lahil-ladhi ahyana ba'da ma amatana; wa ilaihi an-nushur (All the Praises are for Allah Who has made us alive after He made us die (sleep) and unto Him is the Resurrection). "