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."

Azami 11235

Sahih

عن أبي ذر قال

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

الأعظمي 11235صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Morning and evening supplications
Section
Supplications and remembrances narrated when going to sleep and when waking up
Numbering
Jami al-Kamil 11235 (2nd edition)
Azami 11235