Middle-aged or older people who get six to nine hours of sleep a night think better than those sleeping fewer or more hours, according to a recent study.

Researchers from the University of Oregon reaffirm that numerous small-scale studies in the United States, Western Europe and Japan, but it does so using data compiled across six middle-income nations and involving more than 30,000 subjects for a long-term project that began in 2007.

"We wanted to look at aging, particularly dementia and cognitive decline as people get older, and the importance of sleep. Our results provide compelling evidence that sleep matters a lot," Theresa E. Gildner, lead author of the study and a doctoral student in the UO's anthropology department, said in a statement. "In all six countries, which are very different culturally, economically and environmentally -- despite all these differences -- you see similar patterns emerging."

The study was based on the first wave of data from a continuing long-term project, focuses on people 50 years old and older in China, Ghana, India, Mexico, the Russian Federation and South Africa.

Trained native speakers in each country interviewed the participants, who rated their sleep quality on a five-point scale and the number of hours they'd slept over the two previous nights. That information was averaged.

Participants then went through five standard cognitive tests involving immediate recall of a list of presented words, delayed recall of those words later, forward and backward recall of long lists of numbers, and a verbal fluency test in which they listed as many animals as possible without repetition, the use of proper nouns or descriptors.

Researchers found that Men reported higher sleep quality than women in all six nations, with men and women in Mexico reporting the highest. They also found that individuals sleeping less than six hours and more than nine hours had significantly lower cognitive scores compared to those in the intermediate group.

Their findings have important implications for future intervention strategies for dementia, according to the research team.

The findings were recently published Journal of Clinical Sleep Medicine.