The way our bodies are built makes humans particularly good runners. Our hips, legs, and feet are the right shape for it, while our shock-absorbing spine and our endurance ability mean we can run for miles. So it’s no surprise that running can transform your body and brain.

According to neuroscientist Ben Martynoga, who is also an ambassador for the running shoe brand Saucony UK, running has several psychological benefits, including how we deal with stress.

“We know that build-up of a chemical called knyurenine in the brain is associated with psychological stress, but running activates an enzyme in your muscles that breaks down knyurenine and starts to clear it from your brain and body,” he told INSIDER.

“Running can improve your mood, give you a sense of reward, and perhaps even euphoria. Neuroscientists think this is caused, at least partly, by increased production of endocannabinoids and endorphins in your brain. The effects of these chemical signals have some similarity to those of cannabis and opiate drugs.”

Running can also improve our ability to focus, process information, ignore distractions, and direct our attention to tasks.

“Running might even help you have more creative ideas,” Martynoga said. “Scientific studies show that unconscious incubation is a key part of most creative and problem solving processes — even when we don’t consciously think about a challenge or problem, our brain can work in the background to make unexpected links and suggest possible solutions.”

This could be why good ideas seem to “pop up” during or after a run, or a long walk. But it’s important not to over-burden the brain if you want to promote this type of thinking, Martynoga said.

And there is such a thing as too much exercise. Running long distances can cause muscle strain, and pain in the shins, Achilles, and knees.

The ideal distance to run for to get the benefits without injury isn’t easy to determine. Martynoga said it depends on many factors, including how fit you are, and even how fit you think you are.

“These factors will determine how challenging a run is — getting completely exhausted will not help you focus on your work, for example,” he said. “The optimal effort and duration will also depend on what you want from your run.”

One study, published in the journal Preventive Medicine Reports, found that short sprints as part of interval training had a clear effect on attention span. But if you want to achieve a “runner’s high” to boost your mood, you’ll have to push yourself fairly hard.

“But again don’t overdo it,” Martynoga said. “Because very intense exercise can activate the biological stress response.”

Where you run is also important, especially if you want to change your frame of mind or spark some new creative ideas.

Treadmills can be monotonous, and a run in the gym isn’t likely to be as stimulating as getting outside, navigating yourself around a park, and the challenge of varying terrain.

“If you’re looking to hatch ideas on a run, my hunch is that you’d be best to run outdoors in a varied environment, at a moderate intensity, so your brain is engaged but not over-taxed,” said Martynoga. “That seems to be the sweet spot for unconscious incubation of ideas and problems.”

Originally published on www.businessinsider.com.

More from Business Insider:

The best books about science from the last 15 years that everyone should read

32 books everyone should read in their lifetime

10 books Amazon’s editors say are the best reads this August

Follow us here and subscribe here for all the latest news on how you can keep Thriving.

Stay up to date or catch-up on all our podcasts with Arianna Huffington here.