Yahya related to me from Malik from Abu'z-Zinad from al-Araj from Abu Hurayra that the Messenger of Allah ﷺ said, "Shaytan ties three knots at the back of your head when you sleep, and he seals the place of each knot with 'You have a long night ahead, so sleep.' If you wake up and remember Allah, a knot is untied. If you do wudu, a knot is untied. If you pray, a knot is untied, and morning finds you lively and in good spirits, and if not, morning finds you in bad spirits and lazy."
أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ يَعْقِدُ الشَّيْطَانُ عَلَى قَافِيَةِ رَأْسِ أَحَدِكُمْ إِذَا هُوَ نَامَ ثَلاَثَ عُقَدٍ يَضْرِبُ مَكَانَ كُلِّ عُقْدَةٍ عَلَيْكَ لَيْلٌ طَوِيلٌ فَارْقُدْ فَإِنِ اسْتَيْقَظَ فَذَكَرَ اللَّهَ انْحَلَّتْ عُقْدَةٌ فَإِنْ تَوَضَّأَ انْحَلَّتْ عُقْدَةٌ فَإِنْ صَلَّى انْحَلَّتْ عُقَدُهُ فَأَصْبَحَ نَشِيطًا طَيِّبَ النَّفْسِ وَإِلاَّ أَصْبَحَ خَبِيثَ النَّفْسِ كَسْلاَنَ