'A'isha (Allah be pleased with her) reported that the Messenger of Allah (may peace he upon him) used to observe i'tikif in the last ten days of Ramadan till Allah called him back (to his heavenly home). Then his wives observed i'tikaf after him. (Using translation from Muslim 1172c)
إِنَّ رَسُولَ اللهِ ﷺ كَانَ يَعْتَكِفُ الْعَشْرَ الْأَوَاخِرَ مِنْ رَمَضَانَ حَتَّى تَوَفَّاهُ اللهُ ثُمَّ اعْتَكَفَ أَزْوَاجُهُ مِنْ بَعْدِهِ