Performing I’tikaf* is only valid in mosques, for both male and female.
But for those upon whom congregational prayer is Wajib they must do I’tikaf in a mosque where congregational prayers are or will be held, even if the congregation is made up people performing I’tikaf as stated by Shaykh Ahmad al-Qu’aymi.
Based on the above we can see that it’s ok for females to perform it in mosques even if it does not hold congregational prayers as it is not obligatory upon them. However, they still have to do it in mosques, and doing it in prayer rooms that some people have in their homes is not valid. These rooms don’t take the ruling of a mosque as one isn’t considered sinful if they remain in those rooms in a state of Janabah or menstruation.
*I’tikaf is a Sunnah that the Messenger (peace be upon him) practised until he passed away.
Doing so for the last ten nights of Ramadan is highly recommended, but I’tikaf does not have a minimum time according to the Madhhab of Imam Ahmad (r).
So, if one performs I’tikaf for an hour or between Maghrib and Fajr, it is a valid I’tikaf. It is also not a condition for one to be fasting for their I’tikaf to be valid.
This answer was collected from The Hanbali Madhhab website. The answers to the questions are given by Imam Zahed Fattah in accordance to the Hanbali School of Jurisprudence.