I do some of my best writing on the run. I mean literally. When the words won't come, when the syntax doesn't feel right, when I just can't figure out what angle to take on a column, I'll often go for a good, hard run.

And usually it works. With the sweat pouring and lungs working overtime, the mental fog lifts. I make connections I hadn't seen earlier. How to be clear becomes, well, a little more clear.

If you work out routinely, I bet you've had the same experience. Three researchers I interviewed for this story say they have achieved it regularly, on a treadmill, on outdoor runs and on a bicycle, respectively. A couple of studies seem to confirm it.

The tantalizing question for those of us in middle age and beyond (I am 52) is whether this short-term cognitive benefit can be replicated over the long haul. Can exercise help keep our minds sharp? And if so, can it help delay or prevent the truly terrifying mental deterioration of dementia, most commonly seen as Alzheimer's disease?

Researchers studying both animals and humans increasingly say the answer is yes.

Because the science of this mind-body connection is only about 15 years old, there are many caveats and a wide range of opinion on how effective exercise is. At one end of the continuum are people such as John J. Ratey, a Harvard University psychiatrist who synthesized volumes of research for his intriguing 2008 book "Spark: The Revolutionary New Science of Exercise and the Brain."

Ratey says flatly that there is overwhelming evidence that exercise produces large cognitive gains and helps fight dementia.

"Look, the studies are very clear," he said when I called him. "Even if you're in middle age, and you begin to exercise three to four times a week, at fairly moderate rates . . . adding some weights in there . . . you're going to push back cognitive decline by anywhere from 10 to 15 years."

In his book, Ratey notes research that MRI scans of the brains of sedentary people who suddenly improve their fitness show increased volume in the hippocampus and frontal and temporal lobes, regions of the brain associated with cognitive functioning. The hippocampus in particular is associated with memory and learning.

"The major implication is that exercise not only keeps the brain from rotting, but it also reverses the cell deterioration associated with aging," Ratey wrote.

However, a panel of experts convened by the National Institutes of Health for a "State of the Science" conference last month on preventing Alzheimer's disease and cognitive decline was much more cautious. Looking at reducing the risk of "cognitive decline in older adults," it wrote: "Preliminary evidence suggests a beneficial association of physical activity and a range of leisure activities (e.g., club membership, religious services, painting, gardening) with the preservation of cognitive function." A few small studies showed that "increased physical activity may help maintain or improve cognitive function in normal adults," the panel wrote.

There are no good randomized studies that evaluated the effects of physical activity on delaying the onset of Alzheimer's disease, the panel concluded.

I asked Mark Mattson, chief of the Laboratory of Neurosciences at the National Institute on Aging, for help in making some overall sense of this. Mattson's best guess is that sedentary, out-of-shape people who take up exercise may indeed see a significant improvement in their cognitive abilities. People who already are fit probably won't see much gain, he said.

"If you're overeating [and] not getting enough exercise, getting enough exercise is going to be good for your brain, just like it's good for your heart," he said.

Henriette van Praag, an investigator at the National Institute on Aging who studies the same questions through research on mice, was willing to go a little further. "The normal, healthy person likely will benefit from exercise cognitively," she said.

In a 2009 study, van Praag described how she took sedentary mice that were three-quarters of the way through their normal two-year life spans and put them on a training regimen, allowing them to run on an exercise wheel for at least a mile per night for a month.

The result was "significant improvement in learning and memory," she said. When she trained mice to find a safe platform in a tank of murky water, a standard test of learning ability, "aged runners" caught on after a short teaching period, she said. Sedentary mice "never found it at all."

The neuroscience of all this is complex. Researchers have shown that exercise helps produce a protein called "brain-derived neurotrophic factor," which "improves the function of neurons, encourages their growth, and strengthens and protects them against the natural process of cell death," according to Ratey's book. Working out also may improve blood flow in the brain, as it does in other parts of the body. It may even delay accumulation in the brain of plaque associated with Alzheimer's disease.

With the incidence of Alzheimer's expected to triple or quadruple over the next 40 years, Mattson says, we need to fund research into all these areas much more heavily or face the huge public health costs of caring for as many as 20 million patients who generally live for 10 years after diagnosis and can require long-term, labor-intensive care.

And while the volume of that research grows, the safest course of action for both body and mind appears to be to keep our weight down, follow a regular course of moderate to intense exercise, and stick with it.

The MisFits column runs every Thursday in The Post's Local Living section.