Plenty of successful people report that going for a walk helps them to clear their heads, but anecdotal evidence leaves much to be desired, and it isn't obvious why a walk would have this effect. Is it the mere change from your previous sedentary state, the scenery, or something else? Apparently the walking motion itself inspires creativity — even when walkers have nothing interesting to look at, according to researchers at Stanford University.
Almost 200 college students and other adults were subjected to various walking and non-walking conditions, then given a test of "divergent thinking" that required brainstorming unconventional ideas. As reported in the Journal of Experimental Psychology: Learning, Memory and Cognition, the researchers found that "compared with sitting down, walking indoors on a treadmill facing a blank wall or walking outdoors in the fresh air produced twice as many creative responses."
These results were somewhat surprising, as other studies have supported the common sense hypothesis that getting out into nature is the most effective break from work or studying. But actually, walking and viewing nature are suited for different purposes: walking boosts creativity specifically, whereas viewing nature helps you to refocus your attention on the task at hand afterwards. Although the researchers checked, walking did not do anything to help the participants focus their thinking.
Walking has many health benefits in addition to its creativity benefits, so try to work a walk into your daily routine. As far as productivity goes, in addition to choosing the right kind of break for your needs, choose the right drink too — "beer for big ideas, coffee to get them done."