Narrated `Abdullah bin `Umar
Allah's Messenger (ﷺ) used to practice I`tikaf in the last ten days of the month of Ramadan.
Narrated `Aisha
(the wife of the Prophet) The Prophet (ﷺ) used to practice I`tikaf in the last ten days of Ramadan till he died and then his wives used to practice I`tikaf after him.
Narrated Abu Sa`id Al-Khudri
Allah's Messenger (ﷺ) used to practice I`tikaf in the middle ten days of Ramadan and once he stayed in I`tikaf till the night of the twenty-first and it was the night in the morning of which he used to come out of his I`tikaf. The Prophet (ﷺ) said, "Whoever was in I`tikaf with me should stay in I`tikaf for the last ten days, for I was informed (of the date) of the Night (of Qadr) but I have been caused to forget it. (In the dream) I saw myself prostrating in mud and water in the morning of that night. So, look for it in the last ten nights and in the odd ones of them." It rained that night and the roof of the mosque dribbled as it was made of leaf stalks of date-palms. I saw with my own eyes the mark of mud and water on the forehead of the Prophet (i.e. in the morning of the twenty-first).