Abu Hurairah reported,

The Messenger of Allah ﷺ said, "Satan ties three knots at the back of the head of each one of you when he sleeps at night, securing each knot with the words, 'You have a long night ahead, so sleep on.' If he wakes up and remembers Allah, one knot is loosened. If he performs ablution, another knot is loosened. And if he prays, all the knots are loosened, so he begins his morning energetic and in good spirits, having attained good. Otherwise, he begins his morning sluggish and in foul spirits, having attained no good."

Ibn Majah 1329

Sahih

حدثنا أبو بكر بن أبي شيبة حدثنا أبو معاوية عن الأعمش عن أبي صالح

عن أبي هريرة قال

قال رسول الله ﷺ يعقد الشيطان على قافية رأس أحدكم بالليل بحبل فيه ثلاث عقد فإن استيقظ فذكر الله انحلت عقدة فإذا قام فتوضأ انحلت عقدة فإذا قام إلى الصلاة انحلت عقده كلها فيصبح نشيطا طيب النفس قد أصاب خيرا وإن لم يفعل أصبح كسلا خبيث النفس لم يصب خيرا

ابن ماجه 1329صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Establishing prayer and the sunnah regarding it
Chapter
Night prayer
Numbering
Darussalam 1329
Ibn Majah 1329