Al-Aswad bin Qays relates: I heard Sayyiduna Jundub (may Allah be pleased with him) say: The Messenger of Allah (peace and blessings be upon him) fell ill and could not get up (for the night prayer) for one or two nights. Then a woman came to him (peace and blessings be upon him) and said: "O Muhammad, it seems that your devil has abandoned you." So Allah, the Mighty and Majestic, revealed this verse: "By the forenoon, and by the night when it covers, your Lord has neither forsaken you nor is He displeased" [Surah al-Duha: 2].
Hadith Referenceالمعجم الكبير للطبراني / باب الجيم / 1696