Charles Darwin: barnacle aficionado, intrepid scholar, cautious iconoclast – and dogged, daily walker. The grandfather of modern evolutionary theory walked in rain and sunshine, in youth and age, in company and solitude. This constitutional was not just for cardiovascular fitness, or to post his thousands of letters. It was a vital part of his intellectual routine.

The "sandwalk" was a gravel track near Down House, his home in Kent – he called it his "thinking path". Every day, once in the morning and again in the afternoon, Darwin strolled and reflected amongst the privet and hazel, often alongside his fox terrier. Darwin had a little pile of stones on the path, and he kicked one with each turn: some ideas were four-pebble problems.

As walkers and joggers will know, Darwin was not being eccentric: many puzzles are solved on foot. Poet William Wordsworth paced his gravel path, composing rhymes. Novelist Haruki Murakami runs marathons – including the original marathon (albeit backwards), from Athens to the ancient city. It is often written that the citizens of Königsberg set their clocks by the regular walks of philosopher Immanuel Kant. And Friedrich Nietzsche strolled for hours, often around lakes or up mountains. In Sorrento, Italy, he wandered to his Gedankenbaum – his "thought tree".

There are many good reasons for walking and jogging: fitness, health, quiet solitude or conversation, and the stimulation that happenstance affords. But regular footslogging can also enrich our creativity and enhance our character.

Scientists speak of "transient hypofrontality": a state-of-mind promoted by pursuits that require physical exertion but little thought or concentration. The parts of the brain that coordinate general concepts and rules are turned down, while the motor and sensory parts are turned up. In this state, ideas and impressions mingle more freely. Unusual and unexpected thoughts arise.

This is partly why Darwin's son said the naturalist's walks were for his "hard thinking": not simply because he analysed data, but because he allowed his mind to wander as he kicked his stones. He let his idle mind metabolise its massive meals of data. ("I hate a barnacle," he wrote, "as no man ever did before.") Obviously walking was not responsible for Darwin's theory of evolution by natural selection, but a good footslog was certainly part of his cognitive labour – and still is for many today.

Jogging: good for the mind. Photograph: Photograph: Gavin Rodgers/Alamy

Likewise for Murakami, who believes jogging is important for his literary career. It gives the novelist, not only strength and solitude, but also a certain liberty of mind. In What I Talk About When I Talk About Running, Murakami writes that he jogs to gain a "void": a mental blank, around which random thoughts come and go.

In each case, exercise is not purely physical, as if we might carve off the flesh, leaving the spirit behind. And this is a crucial philosophical message: of wholeness. The human condition involves a continual to-and-fro between the body and the mind. In fact, the nouns make these aspects of self seem more divided than they are. Thinking is embodied, and acting is mindful. We are not a ghost in a machine, to use philosopher Gilbert Ryle's phrase: we are bodies, and these bodies are conscious.

In this light, many exercises can have intellectual rewards, and fitness can benefit from our states-of-mind. This has less to do with simplistic corporate slogans – 'just buy it' – and more to do with enlightened pleasure and virtue.

For example, swimming can evoke the sublime, and gesture at the precariousness of human life. As the ancient Greek poets remind us, sprinting can prompt pride: not simply in fast legs or fit lungs, but in the commitment to striving before mortality claims us. Regular jogging can promote consistency of character, and keep us from losing the plot. Rock climbing can encourage humility and caution: attention to our flaws, and to the subtle details of rock or wall. This state-of-mind then allows "flow" to arise: we feel free, timeless, as we skilfully negotiate a challenging task. Ballet and karate can turn pain into a curious pleasure – we choose bruised ribs and aching toes over a life of anaesthetised comfort.

The point is not that we have to be Olympians, tracking personal bests with tailored dawn training schedules. We need not be the fastest, strongest or most agile. The point is that exercise can be a commitment to wholeness; to a life enriched and enhanced by physical and mental striving. Darwin was no professional athlete: but he knew about fitness and flourishing.