Abu Darda reported,

He attributed it to the Prophet ﷺ, who said, "Whoever comes to his bed intending to rise and pray during the night, but sleep overcomes him until morning, will have recorded for him what he intended, and his sleep will be a charity granted to him from his Lord." عز وجل Sufyan differed with him.

Nasai 1788

Sahih

أخبرنا هارون بن عبد الله قال حدثنا حسين بن علي عن زائدة عن سليمان عن حبيب بن أبي ثابت عن عبدة بن أبي لبابة عن سويد بن غفلة

عن أبي الدرداء

يبلغ به النبي ﷺ قال من أتى فراشه وهو ينوي أن يقوم يصلي من الليل فغلبته عيناه حتى أصبح كتب له ما نوى وكان نومه صدقة عليه من ربه عز وجل خالفه سفيان

النسائي 1788صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Night prayer and voluntary prayers of the day
Chapter
One who comes to his bed intending to wake up for prayer but sleeps through
Numbering
Darussalam 1788
Nasai 1788