Of the acts of worship special to this month is that of I'tikaf. Allāh (تعالى) mentions I'tikaf in one place in his book:
أُحِلَّ لَكُمْ لَيْلَةَ الصِّيَامِ الرَّفَثُ إِلَى نِسَائِكُمْ هُنَّ لِبَاسٌ لَكُمْ وَأَنْتُمْ لِبَاسٌ لَهُنَّ عَلِمَ اللَّهُ أَنَّكُمْ كُنْتُمْ تَخْتَانُونَ أَنْفُسَكُمْ فَتَابَ عَلَيْكُمْ وَعَفَا عَنْكُمْ فَالآنَ بَاشِرُوهُنَّ وَابْتَغُوا مَا كَتَبَ اللَّهُ لَكُمْ وَكُلُوا وَاشْرَبُوا حَتَّى يَتَبَيَّنَ لَكُمُ الْخَيْطُ الأبْيَضُ مِنَ الْخَيْطِ الأَسْوَدِ مِنَ الْفَجْرِ ثُمَّ أَتِمُّوا الصِّيَامَ إِلَى اللَّيْلِ وَلاَ تُبَاشِرُوهُنَّ وَأَنْتُمْ عَاكِفُونَ فِي الْمَسَاجِدِ تِلْكَ حُدُودُ اللَّهِ فَلاَ تَقْرَبُوهَا كَذَلِكَ يُبَيِّنُ اللَّهُ آيَاتِهِ لِلنَّاسِ لَعَلَّهُمْ يَتَّقُونَ
“It has been made permissible for you on the night of fasting to go to your wives [for sexual intercourse]. They are a garment for you and you are a garment for them. Allāh knows that you used to deceive yourselves, so then He accepted your repentance and pardoned you. So now, have sexual relations with them and seek that which Allāh has written for you. And eat and drink until the white thread of dawn becomes distinct to you from the black thread. Then complete the fast until nighttime. And do not have sexual relations (wa la tubashiruhunna) with them while you are in I'tikaf in the masjids. These are the boundaries of Allāh, so do not come near them. And thus does Allāh make clear His Signs so that you may become righteous (la'allakum tattaqun).” [Al-Baqarah (2):187]
I'tikaf has been mentioned in connection with fasting. For that reason, and because it was the sunnah of Allāh's Messenger (صلى الله عليه وسلم) to perform I'tikaf in Ramadan, the scholars say it is recommended or obligatory to fast while in I'tikaf. As for the timing of I'tikaf, it shall be discussed in detail shortly, if Allāh wills.
Definition of I'tikaf
I'tikaf is defined as “staying in the masjid for the purpose of worshipping Allāh.”
Sexual Intercourse During I'tikaf
Al-Mubasharah, which is prohibited according to this verse carries the literal meaning of touching. It can refer to any type of touching or it could carry the meaning of a particular type of touching. Al-Hafidh ibn Kathir states in his Tafsir (1/524), “All that is meant by al-Mubasharah is sexual intercourse, and that which leads to it such as kissing and embracing and what is similar to that. As for having the wife helping the husband, then it is permissible.”
In that regard, 'A'ishah relates, saying:
وَإِنْ كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ لَيُدْخِلُ عَلَيَّ رَأْسَهُ وَهُوَ فِي الْمَسْجِدِ فَأُرَجِّلُهُ وَكَانَ لاَ يَدْخُلُ الْبَيْتَ إِلاَّ لِحَاجَةٍ إِذَا كَانَ مُعْتَكِفًا
“Allāh's Messenger (صلى الله عليه وسلم) used to enter his head upon me and I would comb it and oil it (urajjiluhu), while I was menstruating. And he used to not enter the house except for a need when he was in I'tikaf.”
As for sexual intercourse, Ibn 'Abbas said, “When the person in I'tikaf engages in intercourse, his I'tikaf is rendered invalid and comes to an end.”
The Purpose of I'tikaf
Just as Allāh tells us the purpose of fasting in Ramadan is to develop Taqwa, He concludes the verse concerning I'tikaf saying, “And thus does Allāh make clear His Signs so that you may become righteous (la'allakum tattaqun).” Therefore, the purpose of I'tikaf is to develop Taqwa, as with all the other acts of worship instituted for us in the month of Ramadan.
Where is I'tikaf Performed
Allāh's statement, “While you are in I'tikaf in the masjids” indicates by its general wording that the place of I'tikaf is the masjids.
There is, however, a hadith that has been related from Hudhayfah ibn al-Yaman that the Prophet (صلى الله عليه وسلم) said:
لاَ اعتِكَافَ إِلاَّ فيِ المَسَاجِدِ الثَّلاَثَة
“There is no I'tikaf except in the Three Masjids.”
And they are al-masjid al-Haram, al-masjid an-Nabawi, and al-masjid al-Aqsa as has been mentioned explicitly in some of the narrations.
The full text of this hadith is as follows:
Abu Wa'il narrates, saying: Hudhayfah said to 'Abdullah (that is: ibn Mas'ud), “There are a people in I'tikaf between your house and the house of Abu Musa, will you not prohibit them? And you know that Allāh's Messenger (صلى الله عليه وسلم) said, 'There is no I'tikaf except in the Three Masjids.'” So 'Abdullah said, “Perhaps you forgot, and they remembered, or you erred and they were correct.”
This hadith has been reported by Sufyan ibn 'Uyaynah from Jami' ibn Abi Shaddad from Abu Wa'il.
Shaykh al-Albani mentions in as-Sahihah (no. 2786) four narrators who narrated this from Sufyan:
1.) Sa'Īd ibn Mansur reports it in his Sunan from Sufyan ibn 'Uyaynah in marfu' form as mentioned by al-Majd ibn Taymiyyah in al-Muntaqa and ibn Hazm in al-Muhalla. And in his narration, there is doubt, for he stated: “in the Three Masjids, or a masjid of jama'ah.”
2.) Muḥammad ibn al-Faraj. Reported by al-Isma'ili in al-Mu'jam.
3.) Mahmud ibn Adam al-Marwazi. Reported by al-Bayhaqi in as-Sunan.
4.) Hisham ibn 'Ammar. Reported by at-Tahawi in Mushkil al-Athar.
The first three narrators are thiqah, while the fourth was thiqah and then became mixed up.
Shaykh al-Albani states in as-Sahihah that the last three mentioned it without doubt.
However, looking in Sunan al-Bayhaqi (for route number 3), I found it to say:
“in al-masjid al-Haram” or he said “in the Three Masjids.”
And then at the end he says, “the doubt is from me.” Meaning: al-Bayhaqi.
Shaykh al-Albani graded this hadith sahih, and he used it as a proof that I'tikaf is only legislated in the Three Masjids.
However, the response is that this hadith is Ma'lul. The hadith is actually mawquf; that is, it is the statement of Hudhayfah, not of the Prophet (صلى الله عليه وسلم).
The following narrators have narrated the hadith from Sufyan ibn 'Uyaynah with the same isnad but mawquf from the words of 'Hudhayfah:
1.) 'Abdur-Razzaq. 'Abdur-Razzaq reports it in his Musannaf (no. 7761) and at-Tabarani reports it in al-Mu'jam al-Kabir (no. 9398) from the route of 'Abdur-Razzaq.
2.) Muḥammad ibn Yahya ibn Abi 'Umar. Reported by al-Fakihi in Akhbar Mecca (no. 1277).
3.) Sa'Īd ibn 'Abdir-Rahman. Reported by al-Fakihi in Akhbar Mecca (no. 1277).
Shaykh al-Albani mentioned the narration of al-Fakihi in as-Sahihah as well and counted it as marfu', however upon looking at it, I found that the text is mawquf. Perhaps there is difference in the versions of the book. And Allāh knows best.
All three of these narrators are reliable. In particular, 'Abdur-Razzaq is the greatest of all the narrators who have narrated this hadith from Sufyan, whether in mawquf or marfu' form. With regards to Muḥammad ibn Yahya ibn Abi 'Umar, he narrates a great number of hadiths from Sufyan, and in particular, his narrations from Sufyan can be found in great abundance in Sahih Muslim.
As for the marfu' narrations, a criticism can be found for each one:
1.) Sai'd ibn Mansur's narrations from Sufyan are criticized. He is a great Hafidh, but al-Humaydi used to criticize some of his narrations from Sufyan. Additionally, Sa'Īd was not certain as to the exact wording of the hadith as mentioned earlier.
2.) The narration of Muḥammad ibn al-Faraj is problematic because no one has declared the shaykh of al-Isma'ili, Abul-Fadhl al-'Abbas ibn Ahmad al-Washa, a reliable narrator.
3.) As for the narration of Mahmud, there is doubt as to its actual text.
4.) And Abu Dawud said about Hisham ibn 'Ammar that he narrated more than 400 musnad (meaning: marfu') hadiths without basis. And it seems that this could be one such case where he has narrated a hadith in marfu' form while it is actually mawquf.
These defective narrations cannot stand against the authentic narrations that have been mentioned. Therefore, the stronger opinion and is that Sufyan ibn 'Uyaynah narrated this hadith in mawquf form.
The view that the mawquf version is correct is aided by the fact that there is a follow-up narration from a completely different route altogether that shows that the hadith is indeed mawquf:
Sufyan ath-Thawri narrates this story from Wasil al-Ahdab from Ibrahim an-Nakha'i. Three narrators have narrated it from ath-Thawri:
1.) Waki' ibn al-Jarrah. Reported by ibn Abi Shaybah (no. 9511).
2.) Abu Nu'aym. At-Tabarani reports it in his al-Kabir (no. 9397).
3.) 'Abdur-Razzaq. He reports it in his Musannaf (no. 7759) and from him at-Tabarani reports it in al-Kabir (no. 9397).
These three narrators are all trustworthy narrators. The first two are amongst the most reliable narrators of the hadiths of ath-Thawri, and 'Abdur-Razzaq from the level just below them as stated by ibn Rajab in Sharh 'Ilal at-Tirmidhi.
Wasil is a very reliable narrator as well. Bukhāri and Muslim rely upon his narrations and al-Hafidh ibn Hajar said about him, “thiqah thabt.”
Therefore, the chain to Ibrahim an-Nakha'i is sahih. However, Ibrahim did not hear hadiths from ibn Mas'ud or Hudhayfah, so this narration is mursal.
However, the mursal narrations of Ibrahim from ibn Mas'ud are considered to be reliable according to the scholars of hadith. Ibrahim has stated that when he narrates something from ibn Mas'ud without mentioning an intermediary, it is only because he heard it from a number of narrators from the companions of ibn Mas'ud. When he mentions the intermediary who narrated to him from ibn Mas'ud, however, it is because he only heard it from that particular narrator. Shaykh al-Albani himself is one of the scholars who deemed Ibrahim an-Nakha'i's mursal narrations from ibn Mas'ud to be sahih (see Irwa' al-Ghalil 2/131).
Furthermore, it is possible that one might say that in this hadith, Hudhayfah, may Allāh be pleased with him, was confusing the issue of I'tikaf with what is mentioned in the well established hadith reported by Bukhāri and Muslim from Abu Hurayrah and by Muslim from Abu Sa'Īd al-Khudri that Allāh's Messenger (صلى الله عليه وسلم) said:
لاَ تُشَدُّ الرِّحَالُ إِلاَّ إِلىَ ثَلاَثَةِ مَسَاجِدَ: المَسْجِدِ الحَرَامِ وَمَسْجِدِ الرَّسُولِ صَلَّى اللهُ عَلَيهِ وَسَلَّمَ وَمَسْجِدِ الأَقْصَى
“Journeys are not made except to the Three Masjids: al-Masid al-Haram, the masjid of the Messenger (صلى الله عليه وسلم), and masjid al-Aqsa.”
And perhaps this is what ibn Mas'ud meant when he said, “Perhaps you forgot, and they remembered, or you erred and they were correct.”
Furthermore, it seems that ibn Mas'ud would be less likely to reject the words of Hudhayfah if he had attributed them to Allāh's Messenger (صلى الله عليه وسلم) than if he had mentioned them as his own words. And Allāh knows best.
This view is further strengthened by the fact that the opinion that it is permissible to perform I'tikaf in any masjid where the prayers are offered in Jama'ah has been narrated from a number of the Companions, amongst them 'Ali, 'A'ishah, and ibn 'Abbas. This has been the opinion of the overwhelming majority of the scholars throughout the ages.
So given all of these factors, a hadith whose condition is as has just been described cannot be used to restrict the generality of Allāh's Statement, “while you are in I'tikaf in the masjids.”
Note: Some women perform I'tikaf in the sections of their homes that they have designated as their personal masjids. This is in contradiction to the practice of the Companions and the majority of the scholars. Al-Bayhaqi reports from ibn 'Abbas that he said, “The most hated of matters to Allāh are the innovations. And from the innovations is performing I'tikaf in the masjids that are in the houses.”
Timing of I'tikaf and Other Rulings
The Sunnah of Allāh's Messenger (صلى الله عليه وسلم) was to perform I'tikaf the last ten days of Ramadan as related by Bukhāri and Muslim:
عَنْ عَائِشَةَ أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ كَانَ يَعْتَكِفُ الْعَشْرَ الأَوَاخِرَ مِنْ رَمَضَانَ حَتَّى تَوَفَّاهُ اللَّهُ ثُمَّ اعْتَكَفَ أَزْوَاجُهُ مِنْ بَعْدِهِ
'A'ishah relates that the Prophet (صلى الله عليه وسلم) used to perform I'tikaf the last ten days of Ramadan until he died, then his wives performed I'tikaf after him.
And similar is related from 'Abdullah ibn 'Umar:
كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَعْتَكِفُ الْعَشْرَ الأَوَاخِرَ مِنْ رَمَضَانَ
“Allāh's Messenger used to perform I'tikaf the last ten days of Ramadan.” 
And the hadith of A'ishah shows that it is legislated for women to perform I'tikaf as well.
'A'ishah also relates:
كَانَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَعْتَكِفُ فِي الْعَشْرِ الأَوَاخِرِ مِنْ رَمَضَانَ فَكُنْتُ أَضْرِبُ لَهُ خِبَاءً فَيُصَلِّي الصُّبْحَ ثُمَّ يَدْخُلُهُ فَاسْتَأْذَنَتْ حَفْصَةُ عَائِشَةَ أَنْ تَضْرِبَ خِبَاءً فَأَذِنَتْ لَهَا فَضَرَبَتْ خِبَاءً فَلَمَّا رَأَتْهُ زَيْنَبُ ابْنَةُ جَحْشٍ ضَرَبَتْ خِبَاءً آخَرَ فَلَمَّا أَصْبَحَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ رَأَى الْأَخْبِيَةَ فَقَالَ مَا هَذَا فَأُخْبِرَ فَقَالَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ أَلْبِرَّ تُرَوْنَ بِهِنَّ فَتَرَكَ الاِعْتِكَافَ ذَلِكَ الشَّهْرَ ثُمَّ اعْتَكَفَ عَشْرًا مِنْ شَوَّالٍ
“Allāh's Messenger (صل الله عليه وسلم) used to perform I'tikaf in the last ten days of Ramadan, so I would pitch a tent for him, so he would pray as-Subh (fajr) and then enter it. So Hafsah sought permission from 'A'ishah to pitch a tent for her and she allowed her and she pitched her tent. When Zaynab bin Jahsh saw it, she pitched another tent. In the morning the Prophet noticed the tents. He said, 'What is this?' So he was informed of the whole situation. Then the Prophet (صلى الله عليه وسلم) said, 'Do you think that they intended to do righteousness by doing this?' He therefore abandoned the Itikaf in that month and practiced Itikaf for ten days in the month of Shawwal.”
This hadith shows that it is sunnah for a person who was prevented from performing I'tikaf for some reason in Ramadan, to perform it instead in Shawwal, which is the month that follows Ramadan.
And it is also reported by Bukhāri and Muslim that:
'A'ishah used to comb and oil the hair of the Prophet (صلى الله عليه وسلم) while menstruating. He would be in I'tikaf in the masjid and she would be in her chamber, and he would stretch out his head towards her.
This hadith is an evidence that it is permissible to comb and oil the hair or have it done and what is similar to that while in a state of I'tikaf. Also it shows there is no harm in being partially outside of the masjid for that.
And 'Ali ibn al-Husayn relates that Safiyyah informed him:
أَنَّهَا جَاءَتْ إِلَى رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ تَزُورُهُ فِي اعْتِكَافِهِ فِي الْمَسْجِدِ فِي الْعَشْرِ الْأَوَاخِرِ مِنْ رَمَضَانَ فَتَحَدَّثَتْ عِنْدَهُ سَاعَةً ثُمَّ قَامَتْ تَنْقَلِبُ فَقَامَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ مَعَهَا يَقْلِبُهَا حَتَّى إِذَا بَلَغَتْ بَابَ الْمَسْجِدِ عِنْدَ بَابِ أُمِّ سَلَمَة مَرَّ رَجُلَانِ مِنْ الْأَنْصَارِ فَسَلَّمَا عَلَى رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَقَالَ لَهُمَا النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ عَلَى رِسْلِكُمَا إِنَّمَا هِيَ صَفِيَّةُ بِنْتُ حُيَيٍّ فَقَالَا سُبْحَانَ اللَّهِ يَا رَسُولَ اللَّهِ وَكَبُرَ عَلَيْهِمَا فَقَالَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِنَّ الشَّيْطَانَ يَبْلُغُ مِنْ الإِنْسَانِ مَبْلَغَ الدَّمِ وَإِنِّي خَشِيتُ أَنْ يَقْذِفَ فِي قُلُوبِكُمَا شَيْئًا .
That she went to Allāh's Messenger (صلى الله عليه وسلم) to visit him in the masjid while he was in I'tikaf in the last ten days of Ramadan. She had a talk with him for a while, then she got up in order to return home. The Prophet accompanied her. When they reached the gate of the mosque, opposite the door of Umm Salamah, two Ansari men were passing by and they greeted Allāh's Messenger (صلى الله عليه وسلم). He told them, “Do not run away!” And said, “She is (my wife) Safiyyah bint Huyai'.” Both of them said, “subḥānAllāh, O Messenger of Allāh!” And they felt bothered by that. So the Prophet (صلى الله عليه وسلم) said, “Shaytan reaches in wherever blood reaches. I was afraid that Shaytan might cast something in your hearts.”
This hadith shows the permissibility of a wife visiting her husband and speaking with him while he is in I'tikaf. The purpose of I'tikaf is to devote oneself to worship and not merely to socialize as is done by many of those who perform “I'tikaf” these days. However, a little bit of discussion does not harm your I'tikaf or render it invalid. Nonetheless, one must take care that it does not become excessive. As for spending most of one's time in I'tikaf in socializing and telling jokes, this defeats the purpose of I'tikaf which is to strive in the worship of Allāh.
Masruq narrates from 'A'ishah that she said:
كَانَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِذَا دَخَلَ الْعَشْرُ شَدَّ مِئْزَرَهُ وَأَحْيَا لَيْلَهُ وَأَيْقَظَ أَهْلَهُ
“When Allāh's Messenger (صلى الله عليه وسلم) would enter the (last) ten days, he would tighten his waist belt, and stay the night awake, and wake his family.”
It is said the meaning of “he would tighten his waist belt” is that he would strive in worship. And it is said that it means that he would avoid his wives.
And his staying up at night was for the purpose of prayer. So this is an evidence for striving in worship to the utmost in the last ten days. As has preceded, Allāh's Messenger (صلى الله عليه وسلم) used to spend those last ten days in I'tikaf, so there is a clear connection between the two.
Al-Aswad ibn Yazid narrates from 'A'ishah that she said:
كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَجْتَهِدُ فِي الْعَشْرِ الْأَوَاخِرِ مَا لَا يَجْتَهِدُ فِي غَيْرِهِ
“Allāh's Messenger (صلى الله عليه وسلم) used to strive in the last ten days to an extent that he did not strive at any other time.”
Reason For Timing of I'tikaf
Abu Sa'Īd al-Khudri narrates, saying:
إِنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ اعْتَكَفَ الْعَشْرَ الْأَوَّلَ مِنْ رَمَضَانَ ثُمَّ اعْتَكَفَ الْعَشْرَ الْأَوْسَطَ فِي قُبَّةٍ تُرْكِيَّةٍ عَلَى سُدَّتِهَا حَصِيرٌ قَالَ فَأَخَذَ الْحَصِيرَ بِيَدِهِ فَنَحَّاهَا فِي نَاحِيَةِ الْقُبَّةِ ثُمَّ أَطْلَعَ رَأْسَهُ فَكَلَّمَ النَّاسَ فَدَنَوْا مِنْهُ فَقَالَ إِنِّي اعْتَكَفْتُ الْعَشْرَ الْأَوَّلَ أَلْتَمِسُ هَذِهِ اللَّيْلَةَ ثُمَّ اعْتَكَفْتُ الْعَشْرَ الْأَوْسَطَ ثُمَّ أُتِيتُ فَقِيلَ لِي إِنَّهَا فِي الْعَشْرِ الْأَوَاخِرِ فَمَنْ أَحَبَّ مِنْكُمْ أَنْ يَعْتَكِفَ فَلْيَعْتَكِفْ فَاعْتَكَفَ النَّاسُ مَعَهُ قَالَ وَإِنِّي أُرْبِئْتُهَا لَيْلَةَ وِتْرٍ وَإِنِّي أَسْجُدُ صَبِيحَتَهَا فِي طِينٍ وَمَاءٍ فَأَصْبَحَ مِنْ لَيْلَةِ إِحْدَى وَعِشْرِينَ وَقَدْ قَامَ إِلَى الصُّبْحِ فَمَطَرَتْ السَّمَاءُ فَوَكَفَ الْمَسْجِدُ فَأَبْصَرْتُ الطِّينَ وَالْمَاءَ فَخَرَجَ حِينَ فَرَغَ مِنْ صَلَاةِ الصُّبْحِ وَجَبِينُهُ وَرَوْثَةُ أَنْفِهِ فِيهِمَا الطِّينُ وَالْمَاءُ وَإِذَا هِيَ لَيْلَةُ إِحْدَى وَعِشْرِينَ مِنْ الْعَشْرِ الْأَوَاخِرِ .
The Messenger of Allāh (صلى الله عليه وسلم) observed I'tikaf in the first ten days of Ramadan. He then observed I'tikaf in the middle ten days in a Turkish tent with a mat hanging at its door. He took hold of that mat and placed it in the nook of the tent. He then put his head out and spoke to the people and they came near him. He said, “I observed I'tikaf in the first ten days in order to seek that night. I then observed I'tikaf in the middle ten days. Then (an angle) came to me and it was said to me, 'It is in the last ten.' So whoever amongst you would love to observe I'tikaf then let him do so.” So the people observed I'tikaf along with him, and he said, “And I was shown that it was an odd night and that I was prostrating in the morning in mud and water.” So in the morning of the twenty-first night when he got up for as-Subh, there was a rainfall and the mosque dripped, and I saw mud and water. When he came out after completing the morning prayer, there was mud and water on his forehead and the tip of his nose, and that was the twenty-first night from among the last ten.
So one of the purposes of I'tikaf was to focus on worship in order to catch Laylah al-Qadar.
And in his statement, “So whoever amongst you would love to observe I'tikaf then let him do so,” there is a proof that performing I'tikaf is a sunnah as he instructed the people that whoever likes should do so. In addition, he himself continually observed it and would make it up when he missed it as has preceded. This is an indication that it is a sunnah mu'akkadah (emphasized sunnah). In fact, imām Abu Dawud as-Sijistani reports from imām Ahmad that he said, “I do not know of any disagreement from any of the scholars that it is masnun.”
The Prophet (صلى الله عليه وسلم) Performed I'tikaf Twenty Days the Year He Died
ِAbu Salih narrates from Abu Hurayrah that he said:
“The Prophet (صلى الله عليه وسلم) used to perform I'tikaf for ten days every Ramadan, and in the year he died, he performed I'tikaf for twenty days.”
A number of reasons have been given for this. Perhaps the strongest of them is that he desired to increase in his worship and striving for he knew he was at the end of his life, and he wished to set the example for his nation that they should strive to meet Allāh while in the best state possible. This is similar to what ibn 'Abbas stated that when the following verse was revealed:
إِذَا جَاءَ نَصْرُ اللَّهِ وَالْفَتْحُ وَرَأَيْتَ النَّاسَ يَدْخُلُونَ فِي دِينِ اللَّهِ أَفْوَاجًا فَسَبِّحْ بِحَمْدِ رَبِّكَ وَاسْتَغْفِرْهُ
“When the help of Allāh and the victory come, and you see the people entering into the religion of Allāh in crowds, then glorify the praises of your Lord, and seek his forgiveness.” [Surah an-Nasr (110)]
Allāh was informing Allāh's Messenger that his time was coming to an end, so he used to say in his ruku' and his sujud, “Subhanakallahumma rabbana wa bi hamdika, Allahumma-ghfir li Glory is to you, O Allāh, and to You is praise. O Allāh, forgive me.”
Another possible explanation that is proposed is that Jibril used to review the Qur'an with Allāh's Messenger every Ramadan, but when it was the last Ramadan of his life, Jibril reviewed the Qur'an with Allāh's Messenger (صلى الله عليه وسلم) twice. Perhaps, this was related to that. It is possible that both of these reasons may have been influencing factors.
Other explanations have been offered as well, and Allāh knows best.
The Need For I'tikaf
There is a great need for the Muslims to revive this practice of I'tikaf as it disconnects the hearts from the worldly life and reconnects them to Allāh. This allows us to reflect and to realize that we will soon stand before our Lord for the Judgment. This world is fading and in the blink of an eye will be gone. Our focus should be on worshipping Allāh (سبحانه وتعالى) as He says,
وَاذْكُرِ اسْمَ رَبِّكَ بُكْرَةً وَأَصِيلاً. وَمِنَ اللَّيْلِ فَاسْجُدْ لَهُ وَسَبِّحْهُ لَيْلاً طَوِيلاً. إِنَّ هَؤُلَاء يُحِبُّونَ الْعَاجِلَةَ وَيَذَرُونَ وَرَاءهُمْ يَوْماً ثَقِيلاً
And remember the name of your Lord morning and evening, And during the night prostrate to Him and exalt Him a long [part of the] night. Indeed, these [disbelievers] love the fleeting life and leave behind them a heavy Day. [Al-Insan (76):25-27]
 Reported by Bukhāri (no. 2029) and Muslim (no. 297)
 Shaykh al-Albani said about it in Qiyam Ramadan (p. 41), “Reported by ibn Abi Shaybah (3/92) and 'Abdur-Razzaq (4/363) with a sahih sanad.”
 No. 1767, printed with Nayl al-Awtar.
 Meaning a masjid where Jama'ah is prayed.
 It has an 'illah, a hidden deficiency.
 See al-Ma'rifah wat-Tarikh (2/105) of Ya'qub ibn Sufyan al-Fasawi. Al-Fasawi is one of the Shuyūkh of at-Tirmidhi, an-Nasa'i, Abu Bakr ibn Abi Dawud, and a number of other scholars.
 P. 299.
 The narration of Abu Hurayrah is reported by Bukhāri (no. 1189) and Muslim (no. 1397). And the narration of Abu Sa'Īd is reported by Muslim (no. 827).
 This was quoted by Shaykh al-Albani in his book Qiyam Ramadan (p. 36).
 Reported by Bukhāri (no. 2026) and Muslim (no. 1172).
 Reported by Bukhāri (no. 2025) and Muslim (no. 1171).
 Reported by Bukhāri (no. 2046) from the narration of 'Urwah ibn az-Zubayr and by Muslim (no. 297) from the narration of 'Amrah bint 'Abdir-Rahman.
 This hadith is reported by Bukhāri (no. 2035) and Muslim (no. 2175).
 Reported by Bukhāri (no. 2024) and Muslim (no. 1174). This is the wording of Bukhāri.
 Reported by Muslim (no. 1175).
 Reported by Muslim (no. 1167) with various different wordings and Bukhāri has a number of different narrations for it as well (no.2027).
 Masnun – something that has been made sunnah and is recommended. This quote was reported by ibn Hajar in Fath al-Bari (4/346).
 This hadith is reported by Bukhāri (no. 2044), ibn Khuzaymah (2221), and others.
 Reported by Bukhāri (no. 4294) and at-Tirmidhi (no. 3362) who said, “Hasan Sahih.”
 See ibn Hajar's commentary on this hadith (no. 2044) in Fath al-Bari to see these and some of the other explanations given for this hadith.