I’tikaaf means staying in the mosque for a specific purpose, which is to worship Allaah (may He be glorified). It is prescribed in Islam and is mustahabb according to the consensus of the scholars. Imaam Ahmad said, as was narrated from him by Abu Dawood: “I have not heard from any of the scholars that it is anything other than Sunnah.”
Al-Zuhri (may Allaah have mercy on him) said: “How strange the Muslims are! They have given up I’tikaaf, despite the fact that the Prophet (peace and blessings of Allaah be upon him) never abandoned this practice from the time he came to Madeenah until his death.”
Read further about I’tikaaf;