It's the middle of July and you might be heads down at the office, but many of you are probably finding your mind wandering this time of year. Likely, most of you are daydreaming of the same place--the beach.

The rolling waves, the warm sun, the salt smell, the sand under your feet, the beach represents the ultimate in relaxation for many of us. And research backs up our intuition that the sea has a profoundly positive effect on our psychology. Last year my colleague Anne Gherini offered a great rundown of what the beach does to your brain.

But why is that? Why does this one particular kind of place call to us in such an irresistible way? Turns out, science has a few good guesses, and they go way back to our hunter-gatherer ancestors.

You are hard-wired to love the beach.

According to marine biologist and author Wallace Nichols, there's a name for the mysterious connection between humans and the sea. It's also the name of his book: Blue Mind. The phrase describes a "a mildly meditative state characterized by calm, peacefulness, unity, and a sense of general happiness and satisfaction with life in the moment," which we experience when we're near water, he writes in a long and fascinating excerpt on Salon.

Being near water is so incredibly calming, he goes on to explain, because human history and flourishing are so intertwined with this basic solvent of life. Not only do close to 80 percent of the world's population live within 60 miles of the coast, but at birth our bodies are 78 percent water (a percentage, I learned in this article, which decreases as we age).

Water is immensely useful to us now, but it was even more useful to humans in the deep past. Way back in our earliest days as a species, the coast provided one of the best environments for human flourishing, Nichols reports:

In the same way the savannah allowed us to see danger a long way off, [science educator Marcus Eriksen] theorized, coastal dwellers could see predators or enemies as they came across the water. Better, land-based predators rarely came from the water, and most marine-based predators couldn't emerge from the water or survive on land. Even better than that: The number of food and material resources provided in or near the water often trumped what could be found on land. The supply of plant-based and animal food sources may vanish in the winter, Eriksen observed, but our ancestors could fish or harvest shellfish year-round. And because the nature of water is to move and flow, instead of having to travel miles to forage, our ancestors could walk along a shore or riverbank and see what water had brought to them or what came to the water's edge.

The advantages of coastal environments have left a deep imprint on our brains. While few of us spend much time worrying about predators these days, just being near water still makes us happy and calm.

"The late Denis Dutton, a philosopher who focused on the intersection of art and evolution, believed that what we consider 'beautiful' is a result of our ingrained linkage to the kind of natural landscape that ensured our survival as a species," reports Nichols. No wonder blue is the world's favorite color. Nor is it surprising that when British researchers asked adults to rate their feelings about various environments, subjects were more attracted to and felt more positively about any that contained water.

It's also no wonder, then, that when you think of relaxation, abundance, and calm, you probably think of the beach. Millions of years of evolution have programed you to feel that way. So don't fight your nature. Pack yourself a swimsuit, some sunscreen, and a good page-turner, and hit the beach this summer.