Sign up for CNN’s Sleep, But Better newsletter series. Our seven-part guide has helpful hints to achieve better sleep.

CNN  — 

Want to live longer? Then prioritize sleep in your life: Following five good sleep habits added nearly five years to a man’s life expectancy and almost 2.5 years to a woman’s life, a new study found.

“If people have all these ideal sleep behaviors, they are more likely to live longer,” said study coauthor Dr. Frank Qian, a clinical fellow in medicine at Harvard Medical School and internal medicine resident physician at Beth Israel Deaconess Medical Center in Boston.

“If we can improve sleep overall, and identifying sleep disorders is especially important, we may be able to prevent some of this premature mortality,” Qian said in a statement.

What do you do? First, make sure you get a full seven to eight hours of sleep each night. That’s tough for many people: 1 in 3 Americans have a sleep deficit, according to the US Centers for Disease Control and Prevention.

But you have to do more than just lay in bed longer — you also need have to have an uninterrupted, restful sleep more often than not. That means you don’t wake up during the night or have trouble falling asleep more than two times a week. You also have to feel well rested at least five days a week when you wake up. And finally, you can’t be using sleep medications to achieve your slumber.

“We’re talking about not just quality and quantity of sleep, but regularity, getting the same good sleep night after night,” said sleep specialist Dr. Raj Dasgupta, an associate professor of clinical medicine at the University of Southern California’s Keck School of Medicine. He was not involved in the study.

“Recent studies have shown irregularity in sleep timing and duration have been linked to metabolic abnormalities and higher cardiovascular disease risk,” he said. “Encouraging maintenance of regular sleep schedules with consistent sleep durations may be an important part of lifestyle recommendations for the prevention of heart disease.”

A difference between men and women

The preliminary study, presented Thursday at an annual meeting of the American College of Cardiology, analyzed data from over 172,000 people who answered sleep questionnaires between 2013 and 2018 as part of the National Health Interview Survey. The annual survey is done by the CDC and the National Center for Health Statistics.

Each of the five healthy sleep habits — falling asleep easily, staying asleep, getting seven to eight hours of zzz’s, waking up rested and foregoing sleep meds — was assigned a number. People were scored on how many of the five habits they had.

About four years later, researchers compared those scores with National Death Index records to see if their sleep behaviors contributed to an early death from certain diseases or any cause.

The team then factored out other potential causes for a higher risk of dying, such as alcohol consumption, lower socioeconomic status and existing medical conditions.

“Compared to individuals who had zero to one favorable sleep factors, those who had all five were 30% less likely to die for any reason, 21% less likely to die from cardiovascular disease, 19% less likely to die from cancer, and 40% less likely to die of causes other than heart disease or cancer,” according to a statement on the study.

Men who followed all five of the healthy sleep habits had a life expectancy that was 4.7 years greater than people who had none or only one of the five elements of low-risk sleep, the study found.

The impact of healthy sleep habits was much lower for women: Those who followed all five sleep habits gained 2.4 years compared with those who did none or only one.

“That was an interesting part of the study for me, and I hope we can find that answer with more research,” Dasgupta said. One potential reason for that gender difference, he added, could be the difficulty of evaluating women for obstructive sleep apnea, a potentially deadly condition in which breathing stops every few minutes. The more severe the apnea, the greater the risk of coronary artery disease, heart attacks, heart failure and strokes.

“Women with obstructive sleep apnea often get underdiagnosed or misdiagnosed because they may not present with the classic symptoms that we see when we’re evaluating men,” Dasgupta said. “Maybe we need to ask different questions or look at different parameters, or is there something we’re missing here?”

Good sleep hygiene

Would your score be less than five? Don’t fret — the good news is that you can easily train your brain to better sleep by following what is called good “sleep hygiene.” It’s important to go to bed at the same time on most nights and get up at the same time most mornings — even on weekends and holidays.

Make sure your sleeping environment is optimal — cooler and darker is better — and block noise or try a sound machine. Avoid booze before bed — it may seem like you’re falling asleep more easily, but when your liver finishes metabolizing the alcohol at 3 a.m., your body will wake up, experts say.

Set up a sleep routine, with no blue lights or distractions at least an hour before bedtime. Try meditation, yoga, tai chi, warm baths — anything that relaxes you is great.

Parents and caregivers can learn these habits and teach them to their children, thus providing them with a better shot at a longer life, Qian said.

“Even from a young age, if people can develop these good sleep habits of getting enough sleep, making sure they are sleeping without too many distractions and have good sleep hygiene overall, it can greatly benefit their overall long-term health,” he said.

“Just like we like to say, ‘it’s never too late to exercise or stop smoking,’ it’s also never too early. And we should be talking about and assessing sleep more often.”