Itikaf is legislated by the (1) Quran ,(2) Sunnah and (3) the Consensus of the scholars from Ahulus Sunnah.
1. Quran: We commanded Ibrâhim (Abraham) and Ismâ’il (Ishmael) that they should purify My House (the Ka’bah at Makkah) for those who are circumambulating it, or staying (I’tikâf), or bowing or prostrating themselves (there, in prayer).[ Al-Baqarah 125]
2. Sunnah: Aisha (may Allah be pleased with her) narrated that the Prophet (peace and blessings be upon him) used to do Itikaf during the last ten days of Ramadan until he died. And after his death his wives did the same action.” [ Bukhari and Muslim]
3. The consensus of scholars from Ahulus Sunnah : Ibn Munthur, Ibn Hazm, An-Nawawee, Ibn Quddamah, Ibn Taymeeyah and Al-Qurtubi and others (may Allah be pleased with them all) narrated that Itikaf is Sunnah.
· There isn’t anything authentic narrated about the virtue of Itikaf. Abu Dawud asked Imam Ahmed if there were any hadeeth about the virtue of Itikaf ? Imam Ahmed said, “ No, all the hadeeth about Itikaf are weak.”