The Messenger of Allah ﷺ as saying: When one you sleeps, 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 another knot will be loosened; and if he prays, the third knot will be loosened; and in the morning he will be active and in good spirits; otherwise he will be in bad spirits and sluggish. (Using translation from Abū Dāʾūd 1306)
أَنَّ رَسُولَ اللهِ ﷺ قَالَ يَعْقِدُ الشَّيْطَانُ عَلَى قَافِيَةِ رَأْسِ أَحَدِكُمْ إِذَا نَامَ ثَلَاثَ عُقَدٍ كُلُّ عُقْدَةٍ يَضْرِبُ مَكَانَهَا عَلَيْكَ لَيْلٌ طَوِيلٌ فَارْقُدْ فَإِذَا اسْتَيْقَظَ فَإِنْ ذَكَرَ رَبَّهُ انْحَلَّتْ عُقْدَةٌ فَإِنْ تَوَضَّأَ انْحَلَّتْ عُقْدَةٌ فَإِنْ صَلَّى انْحَلَّتْ عُقْدَةٌ فَأَصْبَحَ نَشِيطًا طَيِّبَ النَّفْسِ وَإِنْ لَمْ يَفْعَلْ أَصْبَحَ خَبِيثَ النَّفْسِ كَسْلَانَ