Specifically, sleeping less than six hours a night in midlife can raise the risk of dementia -- the loss of cognitive functioning, like thinking, rememberingand reasoning -- by 30%, according to the new study, published Tuesday in the journal Nature Communications.
"According to this study, quantity [of sleep] really matters," said Dr. Jennifer Ashton, ABC News chief medical correspondent and a board-certified OBGYN, who was not involved in the study.
The study followed nearly 8,000 people in Britain for more than two decades, beginning when they were 50 years old.
Researchers found that most rates of dementia occurred in people who slept on average about seven hours a night, but that the rates of dementia increased by 30% for those who got six hours of sleep or less per night.
"Measurement of sleep duration at age 50, 60, and 70 years along with change in sleep duration over this period provides consistent results for increased risk of dementia in those with short sleep," researchers wrote. "A further key finding is that the association between short sleep duration and dementia is not attributable to mental health."
"Public health messages to encourage good sleep hygiene may be particularly important for people at a higher risk of dementia," the researchers concluded.
How much sleep people should get is not a "one-size-fits-all" answer, according to Ashton, who noted that Americans in particular have historically not put enough emphasis on sleep.
"We’ve said before that sleep has a [public relations] problem in this country," she said. "We think of it as a luxury but it’s really a medical necessity."
According to the U.S. Centers for Disease Control and Prevention, infants and toddlers should get between 11 and 16 hours of sleep per night, depending on age.
Elementary school children should get between nine and 12 hours of sleep per night, according to the CDC.
Teenagers should get eight to 10 hours of sleep per night, according to the CDC.
Adults ages 18 and over should get a minimum of seven hours of sleep per night, according to the CDC.
"What’s really important is that you can’t make up for [sleep] on the weekend," said Ashton. "So it really has to be every single night."
Getting enough sleep and getting a good night's sleep can be difficult for many people, data shows.
Some steps, known as sleep hygiene, can help, according to Ashton.
She recommends keeping a consistent routine and making sure the area where you sleep is cold, dark and quiet. Anything with a screen -- like cellphones and televisions -- should be left out of the bedroom, according to Ashton.
Things that should also be avoided close to bedtime include caffeine, large meals and alcohol, all known sleep disrupters, according to Ashton.
Ashton also noted that getting regular exercise can also help improve sleep.
Read more here for tips on how to get a good night's sleep.