كتاب الصيام
13  
The Book of Fasting
(40)
Chapter: The virtue of Lailat Al-Qadr and the Exhortation to seek it; When it is and the most likely times to seek it
(40)
باب فَضْلِ لَيْلَةِ الْقَدْرِ وَالْحَثِّ عَلَى طَلَبِهَا وَبَيَانِ مَحَلِّهَا وَأَرْجَى أَوْقَاتِ طَلَبِهَا
Sahih Muslim 1167 a

Abu Sa'id al-Khudri (Allah be pleased with him) reported that Allah's Messenger (ﷺ) spent in devotion (in i'tikaf) the middle ten nights of the month of Ramadan, and when twenty nights were over and it was the twenty-first night, he went back to his residence and those who were along with him also returned (to their respective residences). He spent one month in devotion. Then he addressed the people on the night he came back (to his residence) and commanded them as Allah desired (him to command) and then said:

I used to devote myself (observe i'tikaf) during these ten (nights). Then I started devoting myself in the last ten (nights). And he who desires to observe i'tikaf along with me should spend the night) at his place of i'tikaf. And I saw this night (Lailat-ul-Qadr) but I forgot it (the exact night) ; so seek it;In the last ten nights on odd numbers. I saw (the glimpses of that dream) that I was prostrating in water and mud. Abu Sa'id al-Khudri said: It rained on the twenty-first night and the water dripped (from the roof) of the mosque at the place where the Messenger of Allah (ﷺ) observed prayer. I looked at him and as he completed the dawn prayer, (I found) his face was wet with mud and water.
حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، حَدَّثَنَا بَكْرٌ، - وَهُوَ ابْنُ مُضَرَ - عَنِ ابْنِ الْهَادِ، عَنْ مُحَمَّدِ، بْنِ إِبْرَاهِيمَ عَنْ أَبِي سَلَمَةَ بْنِ عَبْدِ الرَّحْمَنِ، عَنْ أَبِي سَعِيدٍ الْخُدْرِيِّ، - رضى الله عنه - قَالَ كَانَ رَسُولُ اللَّهِ صلى الله عليه وسلم يُجَاوِرُ فِي الْعَشْرِ الَّتِي فِي وَسَطِ الشَّهْرِ فَإِذَا كَانَ مِنْ حِينِ تَمْضِي عِشْرُونَ لَيْلَةً وَيَسْتَقْبِلُ إِحْدَى وَعِشْرِينَ يَرْجِعُ إِلَى مَسْكَنِهِ وَرَجَعَ مَنْ كَانَ يُجَاوِرُ مَعَهُ ثُمَّ إِنَّهُ أَقَامَ فِي شَهْرٍ جَاوَرَ فِيهِ تِلْكَ اللَّيْلَةَ الَّتِي كَانَ يَرْجِعُ فِيهَا فَخَطَبَ النَّاسَ فَأَمَرَهُمْ بِمَا شَاءَ اللَّهُ ثُمَّ قَالَ ‏ "‏ إِنِّي كُنْتُ أُجَاوِرُ هَذِهِ الْعَشْرَ ثُمَّ بَدَا لِي أَنْ أُجَاوِرَ هَذِهِ الْعَشْرَ الأَوَاخِرَ فَمَنْ كَانَ اعْتَكَفَ مَعِي فَلْيَبِتْ فِي مُعْتَكَفِهِ وَقَدْ رَأَيْتُ هَذِهِ اللَّيْلَةَ فَأُنْسِيتُهَا فَالْتَمِسُوهَا فِي الْعَشْرِ الأَوَاخِرِ فِي كُلِّ وِتْرٍ وَقَدْ رَأَيْتُنِي أَسْجُدُ فِي مَاءٍ وَطِينٍ ‏"‏ ‏.‏ قَالَ أَبُو سَعِيدٍ الْخُدْرِيُّ مُطِرْنَا لَيْلَةَ إِحْدَى وَعِشْرِينَ فَوَكَفَ الْمَسْجِدُ فِي مُصَلَّى رَسُولِ اللَّهِ صلى الله عليه وسلم فَنَظَرْتُ إِلَيْهِ وَقَدِ انْصَرَفَ مِنْ صَلاَةِ الصُّبْحِ وَوَجْهُهُ مُبْتَلٌّ طِينًا وَمَاءً ‏.‏
Reference : Sahih Muslim 1167a
In-book reference : Book 13, Hadith 275
USC-MSA web (English) reference : Book 6, Hadith 2625
  (deprecated numbering scheme)