Two linked medical studies on age-related working memory decline show surprisingly strong inverse and direct relationships with mood and sleep quality.

In other words, for the mind to work at its best — especially among the elderly — it’s important to ensure one has good sleep quality and be in a good mood, which generally means freedom from depression.

The two new studies investigated how sleep quality, mood and age affect a person's working memory. This type of memory is the short-term memory a person uses daily to survive in his world.

Working memory temporarily stores information in the brain and is important for reasoning, decision-making and behavior. As a person grows older, however, working memory will decline. Depressed mood and low sleep quality, among other factors, can affect working memory both in the short- and long-terms.

The new study published in the Journal of the International Neuropsychological Society looked at how mood and sleep quality affect both the qualitative and quantitative aspects of working memory. These terms refer, respectively, to the strength and accuracy of working memory, and how likely it is that memories associated with this faculty are stored in the brain.

"Other researchers have already linked each of these factors separately to overall working memory function, but our work looked at how these factors are associated with memory quality and quantity — the first time this has been done," lead researcher Weiwei Zhang, Ph.D. said.

"All three factors are interrelated," he added. "For example, seniors are more likely to experience negative mood than younger adults. Poor sleep quality is also often associated with depressed mood."

The two studies revealed a person's age is inversely related to qualitative working memory. This means the more we age, the less accurate our working memory becomes. They also found that experiencing depressed moods and poor sleep quality is linked to worse quantitative working memory.

To put it simply, the less we sleep and the more often we experience negative moods, the less likely it is that we will store short-term memories.

The study acknowledged that sleep quality, mood and age contribute to working memory decline. It also noted that each factor most likely acts on working memory independently, and so they might be tied to different underlying mechanisms.

"We are more confident now about how each one of these factors impacts working memory," Zhang said.

"This could give us a better understanding of the underlying mechanism in age-related dementia. For the mind to work at its best, it is important that senior citizens ensure they have good sleep quality and be in a good mood."

Passengers sleep on a low cost flight. Peter Macdiarmid/Getty Images