“When we walk, we naturally go to the fields and woods: What would become of us, if we walked only in a garden or a mall?” wrote Henry David Thoreau in The Atlantic in 1862.

Thoreau extolled (and extolled and extolled—the piece was more than 12,000 words long) the virtues of walking in untamed environments. In the decades since, psychologists have proved him right. Exposure to nature has been shown repeatedly to reduce stress and boost well-being.

But scientists haven’t been sure why. Does it have to do with the air? The sunshine? Some sort of evolutionary proclivity toward green-ness?

A group of researchers from Stanford University thought the nature effect might have something to do with reducing rumination, or as they describe it, “a maladaptive pattern of self-referential thought that is associated with heightened risk for depression and other mental illnesses.” Rumination is what happens when you get really sad, and you can’t stop thinking about your glumness and what’s causing it: the breakup, the layoff, that biting remark. Rumination shows up as increased activity in a brain region called the subgenual prefrontal cortex, a narrow band in the lower part of the brain that regulates negative emotions. If rumination continues for too long unabated, depression can set it.

For a study published this week in the Proceedings of the National Academy of Sciences, the Stanford scientists examined whether a nature walk could reduce rumination in 38 mentally healthy people. They picked city dwellers because, the researchers predicted, they would have “a somewhat elevated level of rumination resulting from the ongoing and chronic stressors associated with the urban experience.” As in, “Christ almighty, is this the Metro escalator or the ice road to Stalingrad? Move along, people!”    

Views from the nature (A and B) and urban (C and D) walks the participants took (PNAS)

After some preliminary tests, half the participants walked for 90 minutes through a grassland dotted with oak trees and shrubs (“views include neighboring, scenic hills, and distant views of the San Francisco Bay”). The other half took a jaunt along El Camino Real, a four-lane, traffic-logged street in Palo Alto. The nature walkers showed decreases in rumination and in activity in their subgenual prefrontal cortices. The urban walkers showed no such improvements.

Changes in rumination after walking (PNAS)

In general, decreases in rumination are linked to so-called “positive distractions,” like taking part in a hobby or enjoying a long chat with a friend. You’d think that walking in uninterrupted nature wouldn’t provide many diversions from a whorl of dark thoughts. Surprisingly, the opposite seemed to be true: Natural environments are more restorative, the authors write, and thus confer greater psychological benefits.

This effect should work with many types of natural landscapes, particularly those that engender “soft fascination,” the “sense of belonging,” and the “sense of being away,” the researchers note. So while your back yard might do, those little sidewalk parks that have sprouted up at Manhattan intersections might not.

In part because of studies like this, architects and designers are increasingly taking green space into account in their blueprints and plans. But that might become harder to accomplish: More than half the world’s population lives in cities currently, and by 2050, about 70 percent will.

That’s yet another thing Thoreau warned us about:

“Nowadays almost all man's improvements, so called, as the building of houses and the cutting down of the forest and of all large trees, simply deform the landscape, and make it more and more tame and cheap.”