Al-Ilmam bi-Ahadith al-Ahkam 288
وَعَن ابْن عمر رَضِيَ اللَّهُ عَنْهما عَن النَّبِي ﷺ قَالَ: " إِذا استأذنكم نِسَاؤُكُمْ (بِاللَّيْلِ) إِلَى الْمَسْجِد فأذنوا لَهُنَّ ". لفظ رِوَايَة البُخَارِيّ. وَعند أبي دَاوُد: " لَا تمنعوا نِسَائِكُم الْمَسَاجِد، وبيوتهن خير لَهُنَّ ".
And from Ibn ʿUmar, may Allah be pleased with them both, from the Prophet ﷺ, who said: "When your women ask your permission (at night) [to go] to the mosque, give them permission." The wording is al-Bukhari's narration. And with Abu Dawud: "Do not prevent your women from the mosques, though their houses are better for them."