Sleep deprivation pretty much goes with the territory of new parenthood. The mantra, Never wake a sleeping baby, would seem to go without saying, but researchers have found that depressed and excessively anxious moms may actually be fueling their own exhaustion by waking their babies at night.

For years, researchers have known that infants of mothers who are depressed tend to wake up more at night. But why that was happening wasn’t clear. Was there a shared genetic mechanism whereby both depressed mothers and their babies were more sensitive and easily awakened? Was something else going on? The only way to truly tell was to take a peek at nighttime parenting, which researchers at the Pennsylvania State University did.

In their study, published Tuesday in the journal Child Development, they placed multiple cameras in the homes of 45 white mothers of 45 babies ages one to 24 months; 14 of the mothers reported elevated symptoms of depression that ranged along a continuum from low to high. Up to four cameras were trained on various locations, including where the baby slept, on the baby’s door to capture who came in and out, on a glider if one was used to feed the baby and in an additional room if parents tended to take the baby there at night. The devices recorded activity for up to 12 hours, from the beginning of bedtime until the next morning, when mothers reported in a sleep diary how often their babies had awakened.

Douglas Teti, lead author and professor of human development, psychology and pediatrics at Penn State, wasn’t sure what he’d learn, but he had two hypotheses:

the link between moms’ elevated depression and night waking is infant-driven, in that babies who don’t sleep well cause moms to wake up often; sleep loss over time can be associated with greater depressive symptoms, or

moms with depression could be excessively worried about their babies at night, leading them to check on them more than necessary

“To our surprise, we found that moms with elevated depressive symptoms and those with elevated worry were much more likely to seek out their babies in the middle of the night and be with them even when their babies didn’t need attention,” says Teti. “Some babies were sound asleep and their mothers would pick them up and disrupt their sleep.”

In other cases, these same moms would spend more time with their babies at night, nursing them and lying next to them even when they were not upset, in what Teti calls “proactive maternal behavior” that was not observed in nondepressed moms. Nondepressed moms, on the other hand, only went to their babies in the middle of the night if they were crying. (From this finding, I concluded, in retrospect, that I was not in the least bit depressed postpartum.)

Teti speculates that depressed moms experience higher levels of worry about their babies — they’re concerned that they’ll starve or feel abandoned at night — or the mothers may be seeking the babies out at night for own emotional security needs. Likely, it’s both. Even after Teti controlled for excessive worries, depressed moms still sought out their babies more than nondepressed moms at night, suggesting that something else was at play: these moms were probably seeking their babies out for emotional security or “contact comfort.”

In a preview of some more intriguing research, Teti has compiled preliminary data that shows that moms who have more problems in their marriage soon after giving birth are more likely to be bed-sharing and co-sleeping by the time their baby is 6 old. For unhappy moms, sharing a bed with their baby — or rousing them in the middle of the night — may be a way for them to seek emotional comfort.

“This is important because it helps explain the long-standing link between maternal depression and increased infant night waking,” says Teti. “If mothers are needlessly waking their babies up at night that has potential negative consequences for the mother-child relationship over time.”