When Carolyn Stafford’s leg started hurting her, medical tests couldn’t find a cause for the pain. Her doctor suggested that stress might be creating the problem.

At the time, Stafford was working a pressure-filled job in computer support. “I was constantly trying to solve people’s problems,” she says. “I had a lot of stress coming from that.”

Since she enjoyed bicycling, Ms. Stafford decided to see if riding her bike to and from her job would help. She rode five miles each way. “It worked wonders. If it was a frustrating day, I’d get on that bike and I hammered coming home!” she says.

The effects of daily cycling were so beneficial for the Dallastown, PA, woman that when her employer temporarily moved the office nearly 10 miles from her home, she kept on riding. Her coworkers couldn’t believe that Ms. Stafford, then in her early 50s, was going to continue the bike commute. She did—and when the office moved back to its original location, she adjusted her route so that she could still ride almost 10 miles each way. In winter, Ms. Stafford put studded snow tires on her bike and dressed in layers.