عَنِ ابْنِ عُمَرَ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «لَا تَمْنَعُوا نِسَاءَكُمُ الْمَسَاجِدَ وَبُيُوتُهُنَّ خَيْرٌ لَهُنَّ» . رَوَاهُ أَبُو دَاوُدَ
Translation

Ibn Mas'ud reported the Prophet as saying, “It is more excellent for a woman to pray in her house than in her courtyard, and more excellent for her to pray in her private chamber than in her house.” Abu Dawud transmitted it.