Ferris Jabr explains in New Yorker and echoes my views in a much better way:
What is it about walking, in particular, that makes it so amenable to thinking and writing? The answer begins with changes to our chemistry. When we go for a walk, the heart pumps faster, circulating more blood and oxygen not just to the muscles but to all the organs—including the brain. Many experiments have shown that after or during exercise, even very mild exertion, people perform better on tests of memory and attention. Walking on a regular basis also promotes new connections between brain cells, staves off the usual withering of brain tissue that comes with age, increases the volume of the hippocampus (a brain region crucial for memory), and elevates levels of molecules that both stimulate the growth of new neurons and transmit messages between them
… Perhaps the most profound relationship between walking, thinking, and writing reveals itself at the end of a stroll, back at the desk. There, it becomes apparent that writing and walking are extremely similar feats, equal parts physical and mental. When we choose a path through a city or forest, our brain must survey the surrounding environment, construct a mental map of the world, settle on a way forward, and translate that plan into a series of footsteps. Likewise, writing forces the brain to review its own landscape, plot a course through that mental terrain, and transcribe the resulting trail of thoughts by guiding the hands. Walking organizes the world around us; writing organizes our thoughts. Ultimately, maps like the one that Nabokov drew are recursive: they are maps of maps.
Shane O’Mara wrote this in the Wall Street Journal: “Before you start a creatively demanding piece of work, prime yourself by writing down a few questions about what you need to do. Then head off for a 20-minute stroll and bring a voice recorder or a notebook. You’re likely to find that you generate more ideas than you would have while sitting at your desk. A walking brain is a more active brain, and more activity in the brain can bring colliding ideas and associations at the edge of consciousness to mind—resulting in the “a-ha” moment of insight … Walking is the movement that we all profit from and have evolved for. Walk we must, and walk we should, to keep our mental and physical worlds open and to stop the walls from closing in.”
So, there is a science behind walking. Make it a habit. Not just the daily exercise walk, but also the periodic random walk – alone or with a family member or friend. These 30-40 minutes of time free from the mobile and sameness of the home or office can do wonders for the brain, mind, creativity and clarity. To quote Friedrich Nietzsche: “All truly great thoughts are conceived by walking.”