Abu Dharr reported,

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 6325

Sahih

حدثنا عبدان عن أبي حمزة عن منصور عن ربعي بن حراش عن خرشة بن الحر

عن أبي ذر رضي الله عنه قال

كان النبي ﷺ إذا أخذ مضجعه من الليل قال اللهم باسمك أموت وأحيا فإذا استيقظ قال الحمد لله الذي أحيانا بعد ما أماتنا وإليه النشور

البخاري 6325صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Supplications
Chapter
What to say upon waking in the morning
Numbering
Darussalam 6325
Bukhari 6325