Too little or too much sleep increases the rate of mental decline among older women and may contribute to Alzheimer's disease, a study has suggested.
Researchers Brigham and Women's Hospital in Boston studied sleep duration in more than 15,000 women aged 70 and older.
Those who slept for five hours or less a night performed less well in mental tests than those who slept for seven hours.
Could your sleepless nights or lie-ins increase your Alzheimer's risk?
But spending too long in bed was not good for the brain either. Nine hours or more of sleep also led to reduced mental performance.
Sleeping less or more than seven hours had an effect equivalent to ageing by two years.
The women, participants in the Nurses Health Study, had their mental functioning assessed every other year for six years from the age of 70 onwards.
Average sleep duration was recorded twice, when the women were aged 40 to 65, and again at 54 to 79.
Women who changed the amount of time they slept by two hours or more from mid to later life suffered more mental decline than those whose sleep pattern stayed the same.
This effect was seen irrespective of initial sleep duration.
Sleep time also appeared to alter on a molecular biomarker of Alzheimer's, suggesting that sleeping too little or too much might increase the risk of the disease.
Worried about Alzheimer's? Take a look at simple lifestyle changes you can make...
Study leader Elizabeth Devore said: "Our findings support the notion that extreme sleep durations and changes in sleep duration over time may contribute to cognitive decline and early Alzheimer's changes in older adults.
"The public health implications of these findings could be substantial, as they might lead to the eventual identification of sleep - and circadian (body clock) - based strategies for reducing risk of cognitive impairment and Alzheimer's."
Three other studies discussed at the meeting showed links between sleep disorders and abnormal "body clock" patterns and mental impairment.
Dr Anne Corbett, research manager at the Alzheimer's Society, said: "A good night's sleep is one of life's pleasures but once again, this robust research suggests that the quality and duration of sleep are also linked to our cognitive health.
"We're not saying you shouldn't enjoy the occasional lie in, but good quality sleep, eating a balanced diet, maintaining a healthy weight and exercising regularly can all make a difference in reducing your risk."
Dr Marie Janson, from the charity Alzheimer's Research UK, said: "We can already help people to achieve the recommended seven hours, so regulating sleep could become a strategy to protect against cognitive decline if further evidence bears this out. A good night's sleep is one of several lifestyle strategies people can use to protect good health."
The findings were presented today at the Alzheimer's Association International Conference in Vancouver, Canada.
Can't sleep? Find out how to beat the night demons