The Messenger of Allah (ﷺ) said concerning the person observing I’tikaf. “He is refraining from sin and he will be given a reward like that of one who does all kinds of good deeds.”
Sunan Ibn Majah Book 7, Hadith 144