Whenever the Prophet ﷺ lay down to sleep at night, he would say, "O Allah, in Your name I die and I live."When he awoke, he would say, "Praise be to Allah who has given us life after causing us to die, and to Him is the resurrection."
كان النبي ﷺ إذا أخذ مضجعه من الليل قال: اللهم باسمك أموت وأحيا. فإذا استيقظ قال: الحمد لله الذي أحيانا بعد ما أماتنا وإليه النشور.
Bukhari narrated it in the Book of Supplications (6325), from Abdan, from Abu Hamza, from Mansur, from Rabi bin Harash, from Kharasha bin Hurr, from Abu Dharr, who related it.