Recent trends and popular advice telling moms not to sleep with their babies may make mothers who do choose to co-sleep with their infants more likely to feel depressed or judged, according to Penn State researchers.

After analyzing moms’ sleeping patterns and feelings about sleep for the first year of their babies’ lives, the researchers found that mothers who were still co-sleeping—sharing either a room or bed—with their infants after 6 months were more likely to feel depressed, worried about their babies’ sleep, and think their decisions were being criticized.

Douglas Teti, PhD, department head and professor of human development and family studies, Penn State, says that regardless of current parenting trends, it’s important to find a sleep arrangement that works for everyone in the family.

“In other parts of the world, co-sleeping is considered normal, while here in the US, it tends to be frowned upon,” Teti says in a release. “Co-sleeping, as long as its done safely, is fine as long as both parents are on board with it. If it’s working for everyone, and everyone is okay with it, then co-sleeping is a perfectly acceptable option.”

The researchers say that while most American families begin co-sleeping when their babies are first born, most of those families transition the babies to their own room by the time he or she is 6 months old. Teti says concerns about sudden infant death syndrome (SIDS) or the desire for babies to learn how to fall asleep on their own may be why many parents in the US prefer their babies to be sleep alone.

Teti says this study—which analyzed the sleeping habits of 103 mothers in their baby’s first year of life—saw a similar pattern in its participants.

“We found that about 73% of families co-slept at the one-month point. That dropped to about 50% by three months, and by 6 months, it was down to about 25%,” Teti says. “Most babies that were in co-sleeping arrangements in the beginning were moved out into solitary sleep by 6 months.”

The researchers also found that moms who were still co-sleeping with their babies past 6 months were more likely to be more depressed, worry about their baby’s sleep, and feel more criticized than moms who were no longer co-sleeping.

On average, mothers that were still co-sleeping after 6 months reported feeling about 76% more depressed than mothers who had moved their baby into a separate room. They also reportedly felt about 16% more criticized or judged for their sleep habits.

“We definitely saw that the persistent co-sleepers—the moms that were still co-sleeping after 6 months—were the ones who seemed to get the most criticism,” Teti says. “Additionally, they also reported greater levels of worry about their baby’s sleep, which makes sense when you’re getting criticized about something that people are saying you shouldn’t be doing, that raises self-doubt. That’s not good for anyone.”

Teti said that the study—published in the journal Infant and Child Development—isn’t about whether co-sleeping is good or bad, but about the importance of finding a sleep arrangement that works well while not neglecting your partner or spouse.

“If you’re going to co-sleep, you have to make sure both people in the partnership have talked it through and both people are in sync with what they want to do,” Teti says. “If not, that’s when criticism and arguments can happen, and possibly spill over into the relationship with child. So you want to avoid that. You need to make sure you have time with your partner, as well.”

Teti also says that even when co-sleeping works well, it can still cause more loss of sleep for the parents than if the baby slept in its own room.

“If you co-sleep, it is going to disrupt your sleep, and probably Mom’s sleep more than Dad’s,” Teti says. “So this is something to be careful with if you’re not good with chronic sleep debt. Co-sleeping needs to work well for everyone, and that includes getting adequate sleep. To be the best parent you can be, you have to take care of yourself, and your child benefits as a result.”