All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Some Muslim jurists stated that the presence of a child who is not able to discriminate is akin to his absence, and that it is permissible to show one's 'Awrah (parts of the body that should be covered in Islam) in front of him.
For instance, Ibn Al-Muqri from the Shaafi'ee school of jurisprudence, said, “The presence of a child who cannot discriminate is like his absence, and it is permissible to show one's 'Awrah in front of him as Allaah Says (what means): {…or children who are not yet aware of the private aspects of women.} [Quran 24:31]”
However, in our view, the spouses should avoid revealing their 'Awrah or having intercourse in front of the children as much as possible, even if they are younger than the age of discrimination (which can be at a very early age) especially that some scientific research shows that a child in his early age - before the age of discrimination - is affected by acts or scenes which he sees, and that they can even be engraved in his memory. Furthermore, showing one's 'Awrah and having sexual intercourse in front of the child who is younger than the age of discrimination and taking this as a habit may lead a person to continue doing this habit even when the child reaches the age of discrimination. As a matter of fact, we have clarified in Fatwa 85134 that it is not permissible to show one's 'Awrah in front of a child who reached the age of discrimination, let alone having sexual intercourse in front of him.
Allaah Knows best.