وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ أَبِي الزِّنَادِ، عَنِ الأَعْرَجِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏"‏ يَعْقِدُ الشَّيْطَانُ عَلَى قَافِيَةِ رَأْسِ أَحَدِكُمْ إِذَا هُوَ نَامَ ثَلاَثَ عُقَدٍ يَضْرِبُ مَكَانَ كُلِّ عُقْدَةٍ عَلَيْكَ لَيْلٌ طَوِيلٌ فَارْقُدْ فَإِنِ اسْتَيْقَظَ فَذَكَرَ اللَّهَ انْحَلَّتْ عُقْدَةٌ فَإِنْ تَوَضَّأَ انْحَلَّتْ عُقْدَةٌ فَإِنْ صَلَّى انْحَلَّتْ عُقَدُهُ فَأَصْبَحَ نَشِيطًا طَيِّبَ النَّفْسِ وَإِلاَّ أَصْبَحَ خَبِيثَ النَّفْسِ كَسْلاَنَ ‏"‏ ‏.‏

Yahya related to me from Malik from Abu'z-Zinad from al-Araj fromAbu Hurayra that the Messenger of Allah, may Allah bless him and granthim peace, said, "Shaytan ties three knots at the back of your headwhen you sleep, and he seals the place of each knot with 'You have along night ahead, so sleep.' If you wake up and remember Allah, a knotis untied. If you do wudu, a knot is untied. If you pray, a knot isuntied, and morning finds you lively and in good spirits, and if not,morning finds you in bad spirits and lazy." Translation Not Available

Book Ref: Muwatta Imam Malik Book 9 Hadith 430
Web Ref:  Muwatta Imam Malik Book 9 Hadith 98