The Messenger of Allah ﷺ used to perform itikaf during the middle ten days of Ramadan. When the evening of the twentieth night came and the twenty-first was about to begin, he would return to his dwelling, and those who had been performing itikaf with him would also return.In one particular Ramadan, he stayed in itikaf through the night on which he would normally have returned home. He addressed the people, instructing them as Allah willed, then said, "I used to perform itikaf during these ten days, but it has now occurred to me that I should perform itikaf during the last ten. So whoever was in itikaf with me should remain in his place of seclusion. I was shown this night, but then I was made to forget it, so seek it in every odd night. I saw myself prostrating in water and mud."That very night the sky opened and rain poured down. The roof of the mosque leaked over the place where the Prophet ﷺ prayed on the twenty-first night. My own eyes saw the Messenger of Allah ﷺ, and I looked at him as he finished the dawn prayer with his face covered in mud and water.
كان رسول الله ﷺ يجاور في رمضان العشر التي في وسط الشهر، فإذا كان حين يمسي من عشرين ليلة تمضي ويستقبل إحدى وعشرين، رجع إلى مسكنه، ورجع من كان يجاور معه، وأنه أقام في شهر جاور فيه الليلة التي كان يرجع فيها، فخطب الناس، فأمرهم ما شاء الله، ثم قال: كنت أجاور هذه العشر، ثم قد بدا لي أن أجاور هذه العشر الأواخر، فمن كان اعتكف معي فليثبت في معتكفه، وقد أريت هذه الليلة، ثم أنسيتها، فابتغوها في كل وتر، وقد رأيتني أسجد في ماء وطين. فاستهلت السماء في تلك الليلة فأمطرت، فوكف المسجد في مصلى النبي ﷺ ليلة إحدى وعشرين. فبصرت عيني رسول الله ﷺ ونظرت إليه انصرف من الصبح ووجهه ممتلئ طينا وماء.
Bukhari reported it in the chapter on the virtue of Laylat al-Qadr (2018), and Muslim in the Book of Fasting (1167:214), both from the hadith of Abdul-Aziz Darawardi (Bukhari paired him with Ibn Abu Hazim), from Yazid bin Had, from Muhammad bin Ibrahim, from Abu Salama bin Abdul-Rahman, from Abu Saeed Khudri, and he related it, the wording being Bukhari's.As for Muslim, he referred to the narration of Bakr bin Mudar, from Ibn Hadi, with the same chain, and its wording is close.