Sayyidah Zaynab (may Allah be pleased with her) narrates from her mother, Sayyidah Umm Salamah (may Allah be pleased with her), that in the first year the Prophet (peace and blessings be upon him) observed i'tikaf in the first ten days, then he observed i'tikaf in the middle ten days, then he observed i'tikaf in the last ten days, and he said: "I saw Laylat al-Qadr in them, then I was made to forget it." So the Messenger of Allah (peace and blessings be upon him) continued to observe i'tikaf in the last ten days until he (peace and blessings be upon him) passed away.
Hadith Referenceالمعجم الكبير للطبراني / مسند النساء / 20296