The legality of I’tikaf
It is made lawful for you to have sexual relations with your wives on the night of the fasts. They are covering for you and you are the same for them. Allah [swt] knows that you used to deceive yourselves so He turned to you and forgave you. So now have sexual relations with them and seek that which Allah [swt] has ordained for you and eat and drink until the white thread of dawn appears to you distinct from the black thread then complete your fast till the nightfall. And do not have sexual relations with them while you are in I’tikaf in the mosques. These are the limits [set] by Allah [swt] so approach them not. Thus does Allah [swt] make clear His ayat to mankind that they may become the pious.
I’tikaf is recommended in Ramadan
“The Prophet [saws] used to practice I’tikaf in the last ten days of Ramadan till he died and then his wives used to practice I’tikaf after him.”
I’tikaf is for ten days, unless
“Allah’s Messenger [saws] mentioned that he would practice I’tikaf in the last ten days of Ramadan. ‘A’ishah [ra] asked permission to perform I’tikaf and he permitted her. Hafsa [ra] asked ‘A’ishah [ra] to take his permission for her and she did so. When Zainab bint Jahsh [ra] saw that she ordered a tent to be pitched for her and it was pitched for her. Allah’s Messenger [saws] used to proceed to his tent after the salah. So he saw the tents and asked, ‘What is this?’ He was told that those were the tents of ‘A’ishah [ra], Hafsa [ra] and Zainab [ra]. Allah’s Messenger [saws] said, ‘Is it Al-Birr [righteousness] which they intended by doing so? I am not going to perform I’tikaf.’ So he returned home. When the fasting month was over he performed I’tikaf for ten days in the month of Shawwal.”