Sayyidah Aishah (may Allah be pleased with her) narrates that the Messenger of Allah (peace and blessings be upon him) used to observe i'tikaf in the last ten (days) of Ramadan.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصيام / 8566
Sayyiduna Abu Sa'id al-Khudri (may Allah be pleased with him) narrates that the Messenger of Allah (peace and blessings be upon him) observed i'tikaf in the first ten (days) of Ramadan, then observed i'tikaf in the middle ten in a Turkish dome-tent with a reed mat over its entrance. He said: He (peace and blessings be upon him) moved the mat aside with his hand and spoke to the people, and they came close to him. He (peace and blessings be upon him) said: "I observed i'tikaf in the first ten seeking this night, then I observed i'tikaf in the middle ten; then someone came to me and told me that it is in the last ten. So whoever among you would like to observe i'tikaf, let him do so." So the people observed i'tikaf with him (peace and blessings be upon him), and he (peace and blessings be upon him) also said: "I was shown it on an odd night, and (I saw) that on its morning I was prostrating in water and mud." And when he (peace and blessings be upon him) stayed in the mosque and stood (in prayer) until the morning of the twenty-first, the sky rained during the night and water collected in the mosque. Then I saw the water and mud: when he (peace and blessings be upon him) finished the prayer, there was water and mud on his (peace and blessings be upon him) forehead and nose, and it was the twenty-first night of the last ten.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصيام / 8567
Sayyidah Aishah (may Allah be pleased with her) narrates that when he (peace and blessings be upon him) intended to observe i'tikaf, he would pray Fajr and then enter his place of i'tikaf. Once he (peace and blessings be upon him) ordered a tent to be pitched, and it was pitched, as he (peace and blessings be upon him) intended to observe i'tikaf in the last ten (days) of Ramadan. Then Sayyidah Zaynab (may Allah be pleased with her) ordered her tent to be pitched, and it was pitched, and the other wives also had tents pitched. When he had prayed Fajr, he (peace and blessings be upon him) saw the tents and said: "Is it piety that they seek?" He (peace and blessings be upon him) had his tent taken down, then he (peace and blessings be upon him) gave up i'tikaf in Ramadan, until he (peace and blessings be upon him) observed i'tikaf in the first ten (days) of Shawwal.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصيام / 8568