Yichud with ones mother in-law with children at home
It is permitted for one to be in Yichud with the opposite gender if there are children of a certain age [to be explained] present in the area, thus acting as Shomrim. Below we will discuss the age in which a child is valid to serve as a Shomer and help break the Yichud. Having a child that is between these ages at home will allow for example a son in-law to remain home with his mother in-law. It is necessary to note however that at night [at times that people go to sleep] one requires two Shomrim, so one would require having two children within the above range of ages in order to validate staying together.
At what ages can a child serve as a Shomer for purposes of breaking Yichud?
There are various opinions regarding the range of age which makes a child eligible to serve as a Shomer. Practically, children between the age of 6 and 9 are valid Shomrim. This applies whether the child is male or female, and whether or not the child is a relative of the male or female adult of which the Yichud is taking place.
 See Devar Halacha 4/1-3l; Nitei Gavriel 29/1-7; The Laws of Yichud 94
 The following minimum ages are recorded in Poskim: Female child: From 3 years old for a female [Mahram Merothenberg]; From 5 years old or more for a female [Tzemach Tzedek]; Male child: From 5 years old for a male. [Chasam Sofer] From 6 years old. [Chazon Ish] From nine years old for a male. [Hamakneh]
The following maximum age is recorded in Poskim: Female child: Until 9 years old. [Piskei Dinim 192/17; Bach; Pischeiy Teshuvah; Chochmas Adam] Until 12 years old. [Panim Meiros] Male child: Until 9 years old. [Piskei Dinim 192/17; Bach; Chochmas Adam] Until 12 years old. [Mahram Merothenberg]
 Devar Halacha 4/1