Allah’s Apostle, Prophet Mohammed (صلی اللہ علیہ وسلم) used to practice Itikaf (in the mosque) in the middle third of Ramadan and after passing the twenty nights he used to go back to his house on the 21st, and the people who were in Itikaf with him also used to go back to their houses.
Once in Ramadan, in which he practiced Itikaf, he established the night prayers at the night in which he used to return home, and then he addressed the people and ordered them whatever Allah wished him to order and said, “I used to practice Itikaf for these ten days (i.e. the middle 3rd but now I intend to stay in Itikaf for the last ten days (of the month); so whoever was in Itikaf with me should stay at his place of seclusion. I have verily been shown (the date of) this Night (of Qadr) but I have forgotten it. So search for it in the odd nights of the last ten days (of this month). I also saw myself (in the dream) prostrating in mud and water.”
On the night of the 21st, the sky was covered with clouds and it rained, and the rain-water started leaking through the roof of the mosque at the praying place of the Prophet صلی اللہ علیہ وسلم. I saw with my own eyes the Prophet صلی اللہ علیہ وسلم at the completion of the morning prayer leaving with his face covered with mud and water.
Volume 3, Book 32, Number 235,
Narrated by Abu Said Al-Khudri.
Narrated by Abu Salama:
I asked Abu Sa’id, and he was a friend of mine, (about the Night of Qadr) and he said, “We practiced Itikaf (seclusion in the mosque) in the middle third of the month of Ramadan with the Prophet . In the morning of the 20th of Ramadan, the Prophet came and addressed us and said, ‘I was informed of (the date of the Night of Qadr) but I was caused to forget it; so search for it in the odd nights of the last ten nights of the month of Ramadan. (In the dream) I saw myself prostrating in mud and water (as a sign). So, whoever was in l’tikaf with me should return to it with me (for another 10-day’s period)’, and we returned. At that time there was no sign of clouds in the sky but suddenly a cloud came and it rained till rain-water started leaking through the roof of the mosque which was made of date-palm leaf stalks. Then the prayer was established and I saw Allah’s Apostle prostrating in mud and water and I saw the traces of mud on his forehead.”
Volume 3, Book 32, Number 233
source : www.sahih-bukhari.com/Pages/Bukhari_3_32.php