Abu Hurairah reported,

The Prophet ﷺ said, "Whoever says when he goes to bed, 'There is no god but Allah alone, with no partner. To Him belongs all dominion and all praise, and He has power over all things. There is no might nor power except through Allah. Glory be to Allah, praise be to Allah, there is no god but Allah, and Allah is the greatest,' Allah will forgive his sins, or his wrongdoings, even if they are like the foam of the sea."

Azami 11260

Sahih

عن أبي هريرة

عن النبي ﷺ قال: من قال حين يأوي إلى فراشه: لا إله إلا الله وحده لا شريك له له الملك وله الحمد وهو على كل شيء قدير لا حول ولا قوة إلا بالله سبحان الله والحمد لله ولا إله الله والله أكبر غفر الله ذنوبه أو خطاياه، وإن كان مثل زبد البحر.

الأعظمي 11260صحيح
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 11260 (2nd edition)
Azami 11260