The Messenger of Allah (peace and blessings of Allah be upon him) used to observe i’tikaaf during the last ten days of Ramadan
It was narrated that ‘Abd-Allah ibn ‘Umar (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) used to observe i’tikaaf during the last ten days of Ramadaan.
Narrated by al-Bukhaari, 2025; Muslim, 1171.
This hadeeth points to the virtue of observing i’tikaaf in the mosque, especially during the last ten nights of Ramadan, because the Prophet (peace and blessings of Allah be upon him) used to observe i’tikaaf during the last ten days of Ramadaan until he died. Whatever the Prophet (peace and blessings of Allah be upon him) used to do by way of acts or worship to draw closer to Allah is recommended to us.
I'tikaaf (“retreat” for the purpose of worship) means staying in the mosque as an act of worship in order to draw closer to Allah, done on an individual basis in a specific manner.
Al-Qurtubi said in his Tafseer: The scholars are unanimously agreed that i’tikaaf can only be observed in the mosque because of the words of Allah (interpretation of the meaning):
“…while you are in I‘tikaaf (i.e. confining oneself in a mosque for prayers and invocations leaving the worldly activities) in the mosques…” [Al-Baqarah 2:187]
The scholars are also unanimously agreed that i’tikaaf is not obligatory, rather it is a voluntary (naafil) act of worship which the Messenger of Allah (peace and blessings of Allah be upon him), his companions and his wives did.
It is more emphasized in Ramadaan because of the evidence quoted above. The one who enters the mosque should not have make an intention (niyyah) of observing i’tikaaf for the duration of his stay, because there is no evidence to that effect. This is the view of Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him). Al-Ba’li al-Hanbali said in al-Ikhtiyaaraat: Abu’l-‘Abbaas [i.e., Ibn Taymiyah] did not think that the one who goes to the mosque to pray etc has to have the intention of observing i’tikaaf for the duration of his stay. Al-Ikhtiyaaraat al-Fiqhiyyah, p. 144.
It is not correct to observe i’tikaaf anywhere but in a mosque where prayers in congregation are held. If a person’s i’tikaaf will include a Jumu’ah prayer and he can observe it in a Jaami’ mosque (one where Jumu’ah prayers are held), then that is more on the safe side, because some of the scholars stipulate this as a condition (of i’tikaaf). One should enter the place where one is going to observe i’tikaaf after Fajr prayer, because ‘Aa’ishah said: When the Messenger of Allah (peace and blessings of Allah be upon him) wanted to observe i’tikaaf, he would pray Fajr and then enter his place of i’tikaaf.
I'tikaaf in the mosque during the last ten days of Ramadaan brings great benefits. It is a temporary withdrawal from worldly affairs and distractions, and a complete turning to Allah. It is a cutting off from being distracted by people, especially at the end of this blessed month. It is a completion of the benefits of the month, where the fasting person can catch up whatever he has missed of focus, peace of mind and turning completely to Allah.
Because the person who is in i’tikaaf is cutting himself off to worship Allah in one of His houses, he is not allowed to engage in intimacy with women, whether by intercourse, kissing, etc. He is also forbidden to go out except for essential personal needs, such as doing ghusl if he becomes junub because of a wet dream, or if he needs to urinate or defecate, if there is no washroom in the mosque where he can relieve himself or do ghusl. He can also go out to get food if there is no one to bring food to him. ‘Aa’ishah (may Allah be pleased with her) said: The Sunnah for the person in i’tikaaf is for him not to come out except for essential needs.
With regard to his coming out for acts of worship and obedience that are not obligatory, such as visiting a sick person, attending a funeral and so on, he should not do that unless he stipulated that as a condition at the beginning of his i’tikaaf.
If he falls sick during his i’tikaaf, if it is a mild sickness which will not make it too difficult for him to stay in the mosque, such as a headache, toothache, sore eye, etc, that does not require bed-rest, then he is not permitted to leave, because he can be given some medicines where he is, so going out would invalidate his i’tikaaf.
If the sickness is severe and it is too difficult for him to stay in the mosque because he needs bed-rest or to go to the doctor, then it is permissible for him to go out because of his need. If he recovers he should go back into i’tikaaf and start from where he left off. And Allah knows best.
The person who observes i’tikaaf should understand the wisdom behind i’tikaaf and spend his time in prayer, reading Qur’aan and dhikr. He should make good use of his time. He can also seek knowledge and read books on Tawheed, Tafseer and hadeeth, and other useful books. There is nothing wrong with speaking briefly in permissible ways to his family and others if that serves a legitimate purpose, because of the hadeeth of Safiyyah (may Allah be pleased with her). And Allah knows best.
Ahaadeeth al-Siyaam by al-Fawzaan, p. 137.