يٰٓاَيُّهَا الَّذِيْنَ اٰمَنُوْا لِيَسْتَأْذِنْكُمُ الَّذِيْنَ مَلَكَتْ اَيْمَانُكُمْ وَالَّذِيْنَ لَمْ يَبْلُغُوا الْحُلُمَ مِنْكُمْ ثَلٰثَ مَرّٰتٍۗ مِنْ قَبْلِ صَلٰوةِ الْفَجْرِ وَحِيْنَ تَضَعُوْنَ ثِيَابَكُمْ مِّنَ الظَّهِيْرَةِ وَمِنْۢ بَعْدِ صَلٰوةِ الْعِشَاۤءِۗ ثَلٰثُ عَوْرٰتٍ لَّكُمْۗ لَيْسَ عَلَيْكُمْ وَلَا عَلَيْهِمْ جُنَاحٌۢ بَعْدَهُنَّۗ طَوَّافُوْنَ عَلَيْكُمْ بَعْضُكُمْ عَلٰى بَعْضٍۗ كَذٰلِكَ يُبَيِّنُ اللّٰهُ لَكُمُ الْاٰيٰتِۗ وَاللّٰهُ عَلِيْمٌ حَكِيْمٌ ( النور: ٥٨ )
Yaaa aiyuhal lazeena aamanoo li yastaazinkumul lazeena malakat aimaanukum wallazeena lam yablughul huluma minkum salaasa marraat; min qabli Salaatil Fajri wa heena tada'oona siyaa bakum minaz zaheerati wa mim ba'di Salaatil Ishaaa'; salaasu 'awraatil lakum; laisa 'alaikum wa laa 'alaihim junaahum ba'dahunn; tawwaafoona 'alaikum ba'dukum 'alaa ba'd; kazaalika yubaiyinul laahu lakumul aayaat wallaahu 'Aleemun Hakeem (an-Nūr 24:58)
O you who have believed, let those whom your right hands possess and those who have not [yet] reached puberty among you ask permission of you [before entering] at three times: before the dawn prayer and when you put aside your clothing [for rest] at noon and after the night prayer. [These are] three times of privacy for you. There is no blame upon you nor upon them beyond these [periods], for they continually circulate among you – some of you, among others. Thus does Allah make clear to you the verses [i.e., His ordinances]; and Allah is Knowing and Wise. (An-Nur  : 58)
1 Mufti Taqi Usmani
O you who believe, the slaves owned by you, and those of you who have not reached puberty, must seek your permission (to see you) at three times: before the prayer of Fajr, and when you take off your clothes at noon, and after the prayer of ‘Ishā’. These are three times of privacy for you. There is no harm, neither to you nor to them, after these (three times). They are your frequent visitors, as some of you are (frequent visitors) of the others. This is how Allah explains the verses to you. Allah is All-Knowing, All-Wise.