Science has long boasted the benefits of a good night’s sleep. Previous studies have shown that not getting enough rest can contribute to chronic diseases, weight gain and inflammation, which can cause its own slew of ailments like asthma and heart disease. Now, two new studies reveal how your brain works to reset itself at night so you can function during the day.

Chiara Cirelli, MD, PhD, and Giulio Tononi, MD, PhD, who previously coined the synaptic homeostasis hypothesis, which says that sleep is necessary to keep our brains pliable to form new memories, used high-resolution 3D scans to provide visual proof.

Read: How Much Sleep Do You Need? National Sleep Foundation Revises Recommended Hours Of Shut-Eye

The study reconstructed and measured nearly 7,000 synapses, the juncture between nerve cells, in the brains of mice. Over four years, scientists photographed and analyzed parts of the cerebral cortex.

Their results showed that a few hours of sleep resulted in an 18 percent decrease in synapse size. When we’re awake, synapses are repeatedly activated, growing in strength and size, which helps with learning and memory. But, Cirelli and Tononi believe that the growth needs to be counteracted with a rest state in which they shrink.

"This shows, in unequivocal ultrastructural terms, that the balance of synaptic size and strength is upset by wake and restored by sleep," Cirelli says in a statement.

In another study being published in Science on Feb. 3, researchers at Johns Hopkins University looked at the hippocampus and cortex in mice, the area associated with learning and memory. They found that protein Homer1a plays an important role of shrinking the synapses while asleep.

Read: Lack Of Sleep Could Lead To Inflammatory Diseases Like Arthritis, Periodontis, And Even Cancer

"Our findings solidly advance the idea that the mouse and presumably the human brain can only store so much information before it needs to recalibrate," says study author Graham Diering, Ph.D. in a statement. "Without sleep and the recalibration that goes on during sleep, memories are in danger of being lost."

Diering's studies also show that Homer1a detects when your body needs sleep and accumulates in the synapses. However, substances like caffeine get in the way of the protein doing its job.

Of course everyone understands that a good night’s sleep is essential for our well-being, but these studies show how our brains and natural processes are affected by skimping on a full night.

“It is again a big reminder that sleep does something very powerful to the brain, and that we should take it very seriously,” says Cirelli in an email to Medical Daily.

See Also:

6 Strange Things Your Body Does In Its Sleep

How Much Sleep Do You Really Need, And Why?