عَنْ جَابِرٍ رَضِيَ اللَّهُ عَنْهُ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ مَا مِنْ ذَكَرٍ وَلَا أُنْثَى إِلَّا وَعَلَى رَأْسِهِ جَرِيرٌ مَعْقُودٌ ثَلَاثَ عُقَدٍ حِينَ يَرْقُدُ فَإِنْ اسْتَيْقَظَ فَذَكَرَ اللَّهَ تَعَالَى انْحَلَّتْ عُقْدَةٌ فَإِذَا قَامَ فَتَوَضَّأَ انْحَلَّتْ عُقْدَةٌ فَإِذَا قَامَ إِلَى الصَّلَاةِ انْحَلَّتْ عُقَدُهُ كُلُّهَا
It is narrated from Sayyiduna Jabir that the Messenger of Allah, peace and blessings be upon him, said: Every man and woman has a leather cord tied on their head; when a person sleeps, three knots are tied upon him. But when he wakes up and remembers Allah Almighty, one knot is untied; then when he stands up and performs ablution, the second knot is untied; and when he begins to pray, the third knot is untied.