Getting too little sleep can make you feel tired and grumpy.

A lack of sleep does more than this, though. Poor sleep can mean that your brain ages faster, even in midlife, while getting enough sleep helps keep your brain younger. That's what researchers at the University of California, San Francisco (UCSF) found when they calculated how many years having a good night's sleep adds to our brains' youthfulness.

“Our study which used brain scans to determine participants' brain age, suggests that poor sleep is linked to nearly three years of additional brain aging as early as middle age,” Clemente Cavailles, an epidemiologist at UCSF's Center for Population Brain Health, said in a press release.

Sleep deficits in middle age can impact brain health down the road.

The study tracked almost 600 people over 15 years. At the start, the average age of the volunteers was around forty. They were asked to fill out a survey about their sleep habits that included questions such as, “Do you usually have trouble falling asleep” and “Do you usually wake up far too early?”

Five years later they filled out the same questionnaire, which stressed five areas of unhealthy sleep:

  • Poor sleep quality
  • Difficulty falling asleep
  • Difficulty staying asleep
  • Awakening very early
  • Short sleep duration

Volunteers were placed into one of three categories based on the number of bad sleep habits they had: low if they had one or fewer poor sleep indicators; middle if they had two or three; and high if they had four or more.

The research team waited another 10 years before presenting the volunteers with a follow-up survey. They also gave each an MRI brain scan to calculate the participant's brain age using machine learning.

How great a difference was there between groups? After adjusting for factors such as age, sex, high blood pressure and diabetes, the researchers reported that volunteers in the high group with the poorest sleep habits had an average brain age that was 2.6 years older than that of the low group. The middle group's average brain age was 1.6 years older.

Overall poor sleep quality, difficulty falling asleep, difficulty staying asleep and early morning awakening were linked to greater brain age, especially if people consistently maintained these poor sleep characteristics over five years.

The study shows how sleep deficits in middle age can impact brain health down the road. “Future research should focus on finding new ways to improve sleep quality and investigating the long-term impact of sleep on brain health in young people,” researcher Kristine Yaffe, Professor of Psychiatry, Neurology and Epidemiology, at the UCSF Weill Institute for Neurosciences and a member of the American Academy of Neurology, said in a press release.

It's important to note that one of the limitations of the study is that the participants reported their own sleep problems, so it's possible their recollections may not have been totally accurate.

It's indisputable that sleep is important, however. Sleep experts suggest creating a healthy bedtime routine to prepare your body for sleep. Nurturing these habits will help you get a better night's sleep:

  • Avoid caffeine in the late afternoon or evening
  • Don't eat a large meal or drink alcohol right before bedtime
  • Go to bed and get up at the same time every day
  • Keep your bedroom quiet, relaxing and at a cool temperature
  • Turn off electronic devices at least 30 minutes before bedtime
  • Exercise and eat a healthy diet

The study is published in Neurology.