All mamas want to make the best decisions for their babies—but what those exact decisions are can vary widely between families and even within them. When one person feels really passionate about one parenting decision and another feels another way, it can lead to some tension. And, as a new study shows, it may also result in depression among moms who feel shamed.

Looking at the link between depression and co-sleeping habits, researchers found that moms who opted to co-sleep for longer period of time had higher rates of depression —not so much because of the sleeping arrangement itself, but because they felt judged by other parents.

“We definitely saw that the persistent co-sleepers—the moms that were still co-sleeping after six months—were the ones who seemed to get the most criticism,” says co-author Douglas Teti, a professor of human development and family studies at Penn State. “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.”

For the study, researchers analyzed sleeping habits among 103 American mothers during the first year of their babies’ lives. Defining co-sleeping as sharing a bedroom, they found 73% co-slept at at the one-month mark, 50% by three months and 25% at six months.

Among those who were sharing a bedroom at six months, the mothers reported feeling 76% more depressed than those who moved babies to separate rooms. They also felt 16% more criticized for their sleeping arrangement—even though the official recommendation from the American Academy of Pediatricians is for babies to share their parents’ bedroom for six to 12 months.

Despite the AAP guidelines, co-sleeping and especially bed-sharing are still divisive topics among parents. As Teti says, “In other parts of the world, co-sleeping is considered normal, while here in the U.S., it tends to be frowned upon.”

What this study shows is that “frowning upon” other parents’ decisions has consequences all its own. Considering how rampant mom-shaming already is—with 61% of moms reporting feeling judged—we each need to do our part in supporting other parents.

For families who do decide to co-sleep for extended periods of time, Teti notes it’s important that both parents are in agreement (and, no, co-sleeping doesn’t “ruin” relationships) and that moms don’t go into too much sleep debt, which can be another source of depression.

“Co-sleeping needs to work well for everyone, and that includes getting adequate sleep,” Teti says. “To be the best parent you can be, you have to take care of yourself, and your child benefits as a result.”

At the end of the day, we’re all just trying to decide what’s best for our own children—and ourselves.

[This was originally published March 2018 and has been updated.]