Commonly used techniques to help infants sleep through the night were found in a new study to be safe and effective. The infant sleep training techniques, such as “controlled comforting” and “camping out” were also found to improve children and mom’s mental health through the time infants were 2-years-old, but the effects faded overtime.

Many pediatricians offer sleep training tips to new parents, but research on whether these techniques are beneficial in the long-term has been unclear. For the new study – published Sept. 10 in Pediatrics – Australian researchers tracked 225 kids with sleep problems from infancy through the time they turned 6 to see whether utilizing a sleep training program boosted children’s mental health, their relationship with their parents and also whether it had any effect on their parents’ mental health.

“Based on earlier studies, we anticipated there would be no long-term negative effects but wanted to know whether the benefits to children’s sleep and mothers’ mental health extended past two years,” study author Anna Price, a postdoctoral research fellow at Murdoch Children’s Research Institute at the Royal Children’s Hospital in Parkville Australia, told HealthDay.

The researchers offered half the kids’ parents a sleep program which involved using one of two techniques: controlled comforting or camping out. For controlled comforting, a method less extreme than “crying it out,” parents are tasked with responding to their infant’s crying at increasing time intervals to allow them to settle on their own. Camping out is a method that entails parents sitting with the infant until he or she learns to fall asleep independently, gradually removing their presence from the child’s room overtime.

The remaining children did not receive any formal sleep training.

The researchers discovered that infants who engaged in these sleep training methods showed mental health benefits as late as through age 2, which faded by age 6. By that time, kids raised with sleep-training methods were no different than their control subjects who weren’t offered the regimens when it came to behavioral and mental health.

“We have known for many years that these behavioral techniques are helping kids sleep better and that parents have a better night as a result,” says Dr. Marielys Rodriguez-Varela, pediatrician at Miami Children’s Hospital who was not involved in the new research, told WebMD. “Now we can feel even more comfortable in that we know there are no long-term consequences for these children or their parents.”

What’s more, moms of infants of sleep training programs were less likely to report depression two years in, but those effects also faded over time. By study’s end, there was no difference in a mother’s mental health and their parent-child relationship between study groups.

“A well-rested parent is going to be a better parent in the daytime,” Judith Owens, the director of sleep medicine at Children’s National Medical Center in Washington, D.C. who wasn’t involved in the study, told The Wall Street Journal.

Dr. Umakanth Khatwa, the sleep lab director at Boston Children’s Hospital in Massachusetts who wasn’t involved in the paper, told Reuters the new study was “excellent work.”

“I think they looked at this from all sides, and we needed this kind of long term study,” said Khatwa.

Previous research has tied problems that disrupt infants’ sleep, such as snoring and apnea, to a raised risk for developing behavioral problems during childhood.