Language:
كتاب التهجد
19  
Prayer at Night (Tahajjud)
(12)
Chapter: Satan'a tying of knots at the back of the head if one does not offer the ight prayer
(12)
باب عَقْدِ الشَّيْطَانِ عَلَى قَافِيَةِ الرَّأْسِ إِذَا لَمْ يُصَلِّ بِاللَّيْلِ
Sahih al-Bukhari 1142

Narrated Abu Huraira:

Allah's Messenger (ﷺ) said, "Satan puts three knots at the back of the head of any of you if he is asleep. On every knot he reads and exhales the following words, 'The night is long, so stay asleep.' When one wakes up and remembers Allah, one knot is undone; and when one performs ablution, the second knot is undone, and when one prays the third knot is undone and one gets up energetic with a good heart in the morning; otherwise one gets up lazy and with a mischievous heart."

حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ، قَالَ أَخْبَرَنَا مَالِكٌ، عَنْ أَبِي الزِّنَادِ، عَنِ الأَعْرَجِ، عَنْ أَبِي هُرَيْرَةَ ـ رضى الله عنه ـ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ يَعْقِدُ الشَّيْطَانُ عَلَى قَافِيَةِ رَأْسِ أَحَدِكُمْ إِذَا هُوَ نَامَ ثَلاَثَ عُقَدٍ، يَضْرِبُ كُلَّ عُقْدَةٍ عَلَيْكَ لَيْلٌ طَوِيلٌ فَارْقُدْ، فَإِنِ اسْتَيْقَظَ فَذَكَرَ اللَّهَ انْحَلَّتْ عُقْدَةٌ، فَإِنْ تَوَضَّأَ انْحَلَّتْ عُقْدَةٌ، فَإِنْ صَلَّى انْحَلَّتْ عُقْدَةٌ فَأَصْبَحَ نَشِيطًا طَيِّبَ النَّفْسِ، وَإِلاَّ أَصْبَحَ خَبِيثَ النَّفْسِ كَسْلاَنَ ‏"‏‏.‏
Reference : Sahih al-Bukhari 1142
In-book reference : Book 19, Hadith 23
USC-MSA web (English) reference : Vol. 2, Book 21, Hadith 243
  (deprecated numbering scheme)