(28) باب مَا رُوِيَ فِيمَنْ، نَامَ اللَّيْلَ أَجْمَعَ حَتَّى أَصْبَحَ
Abu Huraira transmitted it from the Messenger of Allah (ﷺ):
When any one of you goes to sleep, the devil ties three knots at the back of his neck, sealing every knot with:" You have a long night, so sleep." So if one awakes and mentions Allah, a knot will be loosened; if he performs ablution two knots are loosened; and if he prays (all) knots will be loosened, and in the morning he will be active and in good spirits; otherwise we will be in bad spirits and sluggish in the morning.
Reference: Sahih Muslim 776
In-book reference: Book 6, Hadith 247
USC-MSA web (English) reference(deprecated numbering scheme): Book 4, Hadith 1702