Exercise rewires the brain to cope better with stress and reduce anxiety, according to a study from Princeton University.

Researchers found that when lab mice were exposed to stress- cold water- after a round of physical activity, they had lower activity in the ventral hippocampus, a brain region known to regulate anxiety.

Previous research had found that exercise promotes growth of new neurons in ventral hippocampus, but reduces anxiety. The latest study shows that exercise prevents the neurons from getting activated.

Elizabeth Gould, senior author of the study, said that the findings showed how the brain adapts to an organism's environment and habits. Weaker organisms are more likely to have high anxiety levels that lead to deviant behavior.

"Understanding how the brain regulates anxious behavior gives us potential clues about helping people with anxiety disorders. It also tells us something about how the brain modifies itself to respond optimally to its own environment," said Gould, s a professor in the Princeton Neuroscience Institute, according to a news release.

The study was conducted on two sets of mice; one set had unlimited access to a running wheel while the other had no running wheel. Mice are natural runners and can run for up to 2.5 miles a night. Both the groups were exposed to cold water after a few weeks.

Scientists found that the brains of mice that were active had different reactions to the stressors than the brains of sedentary mice. A brain analysis showed that sedentary mice' brains had increased activity in areas that regulate stress while no such activity was seen in mice that exercised regularly.

The protective effect of exercise on mice brain was cancelled out when researchers blocked the activity of GABA in the brain. GABA is a neurotransmitter that regulates neuronal excitability.

The paper, "Physical Exercise Prevents Stress-Induced Activation of Granule Neurons and Enhances Local Inhibitory Mechanisms in the Dentate Gyrus," was published in the Journal of Neuroscience.

According to a recent study is published in Psychonomic Bulletin and Review aerobic exercise has the potential to improve executive functioning.  Exercise also helps avoid stress and anxiety.