The ability of humans to learn, tell stories and even recognize each other lies in the mass of flesh and goo between our ears. Scientists have long known that the brain needs sleep to review the events of the day to transfer them into long-term memory, just like in the animated film, Inside Out.

In preparing for an exam on the next day, students are often advised to study just before sleeping to maximize their recall of what they studied. But the exact way of how brains store memories during sleep is not well understood, said Dr. Richard Isaacson, who directs the Alzheimer's Prevention Clinic at Weill Cornell Medicine and New York-Presbyterian Hospital.

For the first time, a study published on Tuesday, in the journal Cell Reports discussed how the neurons fire during sleep to "replay" short-term memories to transfer them into more permanent storage. They did it by planting microelectrons inside the brains of two people.

"Using a brain-computer interface is an exciting way to study memory since it can record brain cell activity patterns and then look for those exact patterns later," Isaacson said.

Mapping How Neurons Behave When a Person is Thinking

The research was conducted at BrainGate, which is an academic research consortium that has spent the last decade and more on developing brain-computer interfaces. It allows people with amyotrophic lateral scoliosis (ALS) and several other neurological disorders, brain injury, or limb loss to be able to use their brain signals to move computer cursors, robotic arms, and other assistive devices to communicate and control them.

Computational Neuroscientist and study author Beata Jarosiewicz, said that the macroelectrodes approved for humans use like the deep brain-stimulating electrodes are too big to record an individual activity of a neuron which are very small and only measures about 10 microns in size.

But BrainGate found a way by implanting an array of microelectrodes onto the tip of the brains of two people who have sensory and motor paralysis. It allows them to just think about moving their hand in a direction in which the decoder can translate into action or speech using assistive robotic devices and prosthetic limbs by mapping the way the neurons behave while the patients are thinking.

Jarosiewicz said that different neurons have different preferred directions. Some neurons have firing rates spike whenever the arm is moved upwards, while some whenever it is moved either to the left or right. It becomes visible what direction the person wants to move it by looking at the pattern of activation across all of the neurons.

Read Also: No to Dementia: Drink Red Wine, Eat Dark Chocolates and Other Flavonoid-Rich Foods

Simon says, Take a Nap

The two people were asked to take a nap in which their neuron activity was recorded as a baseline. Afterward, they played a game modeled after the hit game, "Simon says," in which they are asked to repeat the same order of light movements the game had just displayed.

They were asked to use their minds to repeat the actions in the game while their neural activity is recorded, and then they were asked to rest and take a nap.

The results of the nap showed neural activity was strongly correlated with activity recorded when they were actually playing the game. In other words, their brain is still playing the game even when they were asleep, replaying it at a neuronal level.

Isaacson said that the result supports the notion that people should get adequate rest and sleep to optimize memory function and keep it running at peak performance.

Read More: Fact or Fiction: Does Having A Bigger Brain Make You More Intelligent? A New Study Gives Mind-Blowing Answer!