(CNN) The sooner babies get their own rooms, the longer they'll sleep on average, according to a new study that breaks with the recommendations of the American Academy of Pediatrics.

Analyzing surveys from 230 first-time mothers at Penn State, Dr. Ian Paul, a pediatrician, found that babies slept for longer stretches if they didn't sleep in the same bedroom as their parents.

At 4 months, babies who slept alone had the longest stretches of uninterrupted sleep -- by about 45 minutes, on average -- though they slept about the same amount of time as babies who slept in their parents' rooms.

At 9 months, babies in their own rooms slept 40 minutes longer at night and over 20 minutes longer overall, compared with those who were still sharing a room with their parents. Those differences disappeared at 12 months but reappeared later. When the researchers followed up at 2½ years, toddlers who began sleeping alone by 9 months slept 45 minutes longer per night, though total sleep time was roughly the same.

The findings counter the latest guidance from the pediatrics group , which recommends that parents share a room -- but not a bed -- with their infants for at least six months and preferably until they reach their first birthday. The guidelines are meant to lower the risk of sudden infant death syndrome, or SIDS, which may occur while an infant is sleeping.

But while there's evidence to recommend room-sharing with infants for 3 to 6 months, data simply don't support continuing the practice beyond that age, Paul said. Research has shown that nine out of 10 of SIDS deaths happen before the age of 6 months, with the majority happening between 1 and 4 months.

Research has shown that babies who sleep poorly can have a big impact on parents' stress and mental health. Poor infant sleep has also been linked to problems down the line, such as behavioral issues and childhood obesity

Some experts also believe that moving an infant out of the parents' bedroom sooner could help babies sleep better before they develop separation anxiety, said Paul, chief of academic general pediatrics at Penn State College of Medicine.

A year of room-sharing also seems excessive to Paul and other parents, who may be unsure of when to transition an infant to his or her own bedroom, he added. Indeed, Paul said he was "baffled" when the academy released its recommendation last year.

"Most parents don't want their baby sleeping in their room until 1 year," Paul said. "I've got three of them myself."

Sleep like a baby

alone were also more likely to have a consistent bedtime routine, and they were more likely to go to bed by 8 p.m. Infants 4 to 12 months should sleep The differences between the groups went beyond how long babies slept: Infants who slept in a roomalone were also more likely to have a consistent bedtime routine, and they were more likely to go to bed by 8 p.m. Infants 4 to 12 months should sleep 12 to 16 hours per day , including naps, while newborns may sleep much longer, the American Academy of Pediatrics says.

Those babies who shared a room were more likely to be brought into the parents' bed overnight. They were also more likely to sleep with objects like pillows, blankets and stuffed animals. Both practices have been linked to sudden infant death, including by suffocation.

"This is important information," said Dr. Rachel Moon , a professor of pediatrics at the University of Virginia who co-authored the American Academy of Pediatrics' latest recommendation. "We don't have enough info about downstream effects about what we've recommended."

About 3,700 babies died from sudden, unexpected causes in 2015, according to the CDC , accounting for about 92 deaths per 100,000 live births. Risks for SIDS include loose bedding, sleeping in the same bed as parents, sleeping face-down and living at home with a smoker.

But Moon, a SIDS researcher, cautioned in response to Paul's study that just because sleep is uninterrupted doesn't mean it's better.

"We think that a lot of the problems with SIDS is that babies don't arouse," she said, adding that if babies sleep too deeply or for too long, some experts believe this could put them at risk.

Room-sharing has been estimated to lower the risk of SIDS by as much as to 50%, according to the report Moon co-authored.

"People don't know quite why the risk is lowered," Dr. Ari Brown, an Austin, Texas-based pediatrician and author of the Baby411 book series, previously told CNN. "I might chalk it up to a parent's sixth sense when a baby is nearby and making erratic noises or not that helps save these babies."

Breastfeeding has also been linked to a lower risk of SIDS.

The Penn State sample was also "not terribly diverse in terms of socioeconomic or racial diversity," which could cast doubts upon how much this research speaks for the general population, Moon said. The mothers in the study were overwhelmingly white and wealthier than the average American.

And because the current study was a survey, parents' perception of sleep might also be different from the number of hours actually slept, Moon said.

It's also possible that parents simply noticed their babies were awake because they shared a room, Paul said.

"But that's the point," he said. "If parents are in the room, they're responding unnecessarily."

The wrong side of the bed?

The American Academy of Pediatrics' recommendations -- which Paul says run counter to the advice of many pediatricians and sleep specialists -- may leave some parents unsure of when to cut the proverbial cord to their bedroom.

"It's common that they start out sharing a room. Then parents often ask me when it's time to take them out of the room," Dr. Jennifer Shu , medical editor-in-chief of the academy's website HealthyChildren.org , previously told CNN.

Instead of changing the guidelines, Moon said, doctors can use the new study to give better guidance to room-sharing parents who may be more likely to bring their baby into bed overnight, putting them at risk.

Join the conversation See the latest news and share your comments with CNN Health on Facebook and Twitter.

"If we know that this is happening, then we can do a better job of providing proactive guidance for families," she said.

But Paul knows firsthand the lengths to which parents will go to get as much shut-eye as they can.

"They're going to do whatever they can to get the child back to sleep," he said.