Since children are yet to be obliged with Islamic duties until they reach puberty in the eyes of Islam, Allah (swt) orders parents to order their children to respect their “private space” and ask permission before entering into their parents' room during three specific times, which are the times when spouses usually “rest” and the three times are before dawn “fajr” prayer, noon when people usually used to sleep and rest(2), and after night “Isha” prayer.
The wisdom behind this discipline is that usually parents at these times are either in intercourse, or nestling or wearing their underclothing etc., which can lead to many complications and harms if children burst into the room such as:
• Movement of sexual curiosity
• Emotional and mental pain
• Removal of modesty from the child
These harms are hinted out in sayings like the saying of the Prophet (pbuh) “I swear by the one who my soul is under his power that if a man had intercourse with a woman and there was a child awake who can see and hear their words and breath then he would never be prosperous, if it was a boy he will become a man who commits adultery and if it was a girl she would become a woman who commits adultery.”(3). This is for the fact that the child who sees or hears these things will get traumatized and will suffer from psychological pain which will lead up to anger, curiosity, and even fear.
1. 24:58 (translated by quran.com)
2. The Spanish call it siesta
3. Al-Kafi v5 p500