[Machine] Aisha, the wife of the Prophet ﷺ , narrated that the Prophet ﷺ used to observe i'tikaf during the last ten days of Ramadan until his death. After him, his wives also observed i'tikaf. The Sunnah (recommended practice) regarding i'tikaf is that one should not leave except for necessary matters that cannot be avoided, should not return while being sick, should not have sexual relations with his wife, and should observe i'tikaf only in a congregation mosque. The Sunnah for those observing i'tikaf is to fast.
عَنْ عَائِشَةَ زَوْجِ النَّبِيِّ ﷺ أَنَّ النَّبِيَّ ﷺ كَانَ يَعْتَكِفُ الْعَشْرَ الْأَوَاخِرَ مِنْ رَمَضَانَ حَتَّى تَوَفَّاهُ اللهُ ثُمَّ اعْتَكَفَ أَزْوَاجُهُ مِنْ بَعْدِهِ وَالسُّنَّةُ فِي الْمُعْتَكِفِ أَنْ لَا يَخْرُجَ إِلَّا لِحَاجَتِهِ الَّتِي لَا بُدَّ لَهُ مِنْهَا وَلَا يَعُودُ مَرِيضًا وَلَا يَمَسُّ امْرَأَتَهُ وَلَا يُبَاشِرُهَا وَلَا اعْتِكَافَ إِلَّا فِي مَسْجِدِ جَمَاعَةٍ وَالسُّنَّةُ فِيمَنِ اعْتَكَفَ أَنْ يَصُومَ