Ibn `Umar (May Allah be pleased with them) reported:
The Messenger of Allah (ﷺ) used to observe I`tikaf in the last ten days of Ramadan.[Al-Bukhari and Muslim].
'Aishah (May Allah be pleased with her) reported:
The Prophet (ﷺ) used to engage himself in I'tikaf (seclusion for prayers) in the mosque during the last ten nights of Ramadan till he passed away; thereafter, his wives followed this practice after him.[Al- Bukhari and Muslim].
Abu Hurairah (May Allah be pleased with him) reported:
The Prophet (ﷺ) used to observe I'tikaf every year (during Ramadan) for ten days; in the year in which he passed away, he observed I'tikaf for twenty days.[Al-Bukhari].