The Messenger of Allah (ﷺ) used to observe I`tikaf in the last ten days of Ramadan. .
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..
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..