Sleep problems are associated with worse memory and executive functions in older people, says a study.
There is an association between both quality and duration of sleep and brain function which changes with age, the findings showed.
In adults aged between 50 and 64 years of age, short sleep (less than 6 hours per night) and long sleep (more than 8 hours per night) were associated with lower brain function scores.
By contrast, in older adults (65-89 years), lower brain function scores were only observed in long sleepers.
"6-8 hours of sleep per night is particularly important for optimum brain function in younger adults," said Michelle Miller from the University of Warwick in Britain.
"These results are consistent with our previous research which showed that 6-8 hours of sleep per night was optimal for physical health, including lowest risk of developing obesity, hypertension, diabetes, heart disease and stroke," she added.
The study involved analysis of sleep and cognitive (brain function) data from 3,968 men and 4,821 women who took part in the English Longitudinal Study of Ageing (ELSA).
The study appeared in the journal PLOS ONE.