Lack of sleep has been linked to everything from erratic mood swings to weight gain to a weakening of the immune system. In 2007, the World Health Organization even declared shift work a "probable carcinogen," because it fundamentally interferes with an individual's circadian rhythms and rest patterns.

Matthew Walker, a neuroscience and psychology professor and director of the Sleep and Neuroimaging Lab at the University of California, Berkeley, spoke about sleep and how it is vital to a person's physical and mental health at Smithsonian magazine's "Future is Here" festival this past weekend. During his talk, he described a bold idea to improve older individuals' ability to create and retain memories by stimulating their brains with a low current while they sleep.

Deep sleep, a period that's known as vital for memory formation, becomes rarer as people age, waning more and more after individuals hit their mid-30s. By attaching two electrodes to a person's scalp, Walker can direct a current into the prefrontal area and simulate the slow waves of deep sleep while the wearer slumbers.

The technique is called transcranial direct-current stimulation (tDCS), and while the equipment to do it is commercially available, it is not FDA approved for use on medical conditions. The devices in their current form aren't intelligent enough to know when a wearer is in deep non-rapid eye movement (NREM) sleep, and so they aren't able to start stimulating in that sleep stage on their own and sync up with the brain's waves. "At present, we scientists need to do this in a sleep lab," says Walker. "We have to measure someone's sleep, and then switch the stimulator on at the desired stimulating rhythm to have a beneficial effect." That said, he believes in five to eight years these issues will be resolved, and these devices could help those with Alzheimer's, dementia, insomnia, depression and anxiety.

Walker's body of research has examined sleep's pivotal role in helping the brain create and preserve memories as well as maintain emotionally balanced behavior. When it comes to establishing strong memories, sleep is a necessary factor for both their formation and retention.

"Sleep after learning is essential to hit the 'save' button," says Walker. "It is also vital before learning."

In a study he conducted, Walker looked at two groups of students: a control group that had a standard full night's rest and an experimental one that was asked to stay awake all night. After their respective nights, the students were tasked with learning a set of words holding positive, negative and neutral associations. Following two days of recovery sleep, they were asked to take a recognition test. Walker discovered that those who hadn't slept retained 40 percent less than their well-rested counterparts.

Walker monitored the hippocampus of study participants, the part of the brain where memories are conceived, with an electroencephalogram (EEG) which tracked electrical activity, while they were being taught this new information. He found the sleep-deprived individuals showed minimal signs of any brain activity while their wakeful friends had plenty of learning-related activity taking place.

"It is as though sleep deprivation has shut down the brain's inbox," he says. "They could not accept any new, incoming memories."

When it came to emotional responses, Walker witnessed the sleepless participants becoming increasingly more volatile, oscillating between impromptu giddiness and expletive-laced anger. In measuring their reactions, he found that the tired students exhibited an "amplified, aggravated degree of reactivity by well over 60 percent."

"Without sleep you are all emotional gas pedal and no brake," he says, a behavioral pattern that's also associated with many psychiatric disorders, including depression, anxiety and post-traumatic stress disorder.

So why, Walker wondered, were the students who slept better equipped to create memories? What exactly did they gain by sleeping? Using electrodes, he measured the brain activity of the students as they slept, and witnessed "powerful bursts of brain activity" that occur during a particular stage of deep sleep known as the slow-wave phase.

"These spectacular bursts of electrical activity act as a file transfer mechanism," says Walker, "refreshing and enhancing learning and memory."

In another study, Walker, his Berkeley colleague Bryce A. Mander and researchers from the California Pacific Medical Center in San Francisco, the University of California, San Diego and the Lawrence Berkeley National Laboratory discovered a connection between sleep, aging and memory loss. It's long been observed that as individuals get older, their memories become less sharp. As people age, their quality of sleep also declines. Mander and Walker found that physical changes that happen in the brain as humans age actually disrupt the quality of their sleep, and these changes in their sleep then hinder their long term memory.

Matt Walker speaks at Smithsonian magazine's 2015 Future Is Here Festival

Walker wonders if it would be possible to replicate or amplify the "powerful bursts of brain activity" of deep sleep to help people, like those with Alzheimer's, improve their memory formation and retention. Using electrodes attached to the head, scientists could infuse a low current into patients' prefrontal areas and simulate the slow waves of deep sleep, while wearers were already resting.

"Our hope for the future is that, by applying this affordable technology to older adults and those with dementia, we can amplify and restore some quality of sleeping brainwave activity, and in doing so, rescue learning and memory," Walker says. "Sleep is a treatable target."