ʿAbdullah b. Mas’ūd – Allāh be pleased with him – said:
Falling asleep when remembering Allāh is from Shayṭān; if you want you can test this: when you lie down and want to fall asleep, try remembering Allāh ‘azza wa jall.
Al-Bukhārī, Al-Adab Al-Mufrad. Graded ṣaḥīḥ by Shaykh Al-Albānī in Ṣaḥīḥ Al-Adab Al-Mufrad Vol. 1 p490.