The Messenger of Allah ﷺ said, "There is no person who has a regular night prayer but is overcome by sleep, except that the reward of his prayer is written for him, and his sleep is counted as a charity for him."
حدثنا القعنبي عن مالك عن محمد بن المنكدر عن سعيد بن جبير عن رجل عنده رضي أن
أن رسول الله ﷺ قال ما من امرئ تكون له صلاة بليل يغلبه عليها نوم إلا كتب له أجر صلاته وكان نومه عليه صدقة
[Sahih]. Nasai narrated it in Qiyam al-Layl, the chapter of one who used to pray at night but was overcome by sleep, hadith 1785, from the hadith of Malik, through this route, and it is in Muwatta (Yahya) 1/117. The reliable man is Aswad bin Yazid, and the hadith has corroborating narrations.