Sunan an-Nasa'i 1787
Grading supplied with this record: Sahih (Darussalam)
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
مَنْ أَتَى فِرَاشَهُ وَهُوَ يَنْوِي أَنْ يَقُومَ يُصَلِّي مِنَ اللَّيْلِ فَغَلَبَتْهُ عَيْنَاهُ حَتَّى أَصْبَحَ كُتِبَ لَهُ مَا نَوَى وَكَانَ نَوْمُهُ صَدَقَةً عَلَيْهِ مِنْ رَبِّهِ عَزَّ وَجَلَّ "
It was narrated from Abu Ad-Darda' who attributed it to the Prophet (ﷺ):
"Whoever goes to his bed intending to get up and pray qiyam at night, then sleep overwhelms him until morning, will have recorded that which he intended and his sleep is a charity given to him by his Lord, the Mighty and Sublime."
Full reference and source
Sunan an-Nasa'i 1787 In-book : Book 20, Hadith 190 English translation : Vol. 2, Book 20, Hadith 1788
View source on Sunnah.com (opens in a new tab)