Updated

In the new book Fitter Faster ($17, amazon.com), health journalist Robert J. Davis and celebrity trainer Brad Kolowich, Jr. share one more excellent reason to break a sweat.

You’ve likely heard that regular exercise can reduce the risk of chronic conditions such as heart disease, diabetes, or osteoporosis. But a growing body of research shows it may have another, more surprising effect: improving your sex life.

In men, regular exercise appears to be a natural Viagra. It’s associated with a lower risk of erectile problems. In one study, sedentary middle-aged men assigned to participate in a vigorous exercise program for nine months reported more frequent sexual activity, improved sexual function and greater satisfaction. Those whose fitness levels increased most saw the biggest improvements in their sex lives.

Research in women has found that those who are physically active report greater sexual desire, arousal and satisfaction than women who are sedentary. In one unusual experiment, young women who did intense cycling for 20 minutes and watched an X-rated film showed greater physiological sexual arousal (as measured by a device that assesses vaginal blood flow) than subjects who did not exercise before seeing the film.

Increased blood flow helps explain why exercise leads to better sexual function in men as well. An enhanced self-image from exercise may play a role too. Men and women who exercise may be more likely to feel sexually desirable, which can lead to better sex.  So can greater strength, flexibility, and stamina that result from exercise.

In addition, physical activity—especially strength training—can increase levels of testosterone, which may boost sex drive in men and women. However, overtraining can have the opposite effect by lowering testosterone levels. Indeed, a recent study found that that men who do very vigorous exercise on a regular basis tend to have lower libidos. While this is a potential concern for elite athletes or others who push themselves to the max without adequate recovery, it’s not something that most of us need to worry about.

RELATED: 13 Truths About Sex Every Woman Must Learn Before Turning 30

As for the effect of sex on exercise, the conventional wisdom has long been that pre-competition sexual activity reduces aggression and strength. As Rocky Balboa’s trainer put it in the movie Rocky, “women weaken legs.”

But research has yielded little support for the belief.  One study, which involved former male athletes, measured grip strength the morning after they’d had sex with their wives and then repeated the test after the men had abstained for at least six days. There were no differences in test results. Similarly, another study in male athletes found that sexual activity didn’t affect performance on a cycle stress test. However, subjects who’d had sex two hours before the test had higher heart rates during post-exercise recovery.

Overall, the research suggests that sex before physical activity doesn’t have negative effects as long as there’s a lag of at least two hours and the sexual activity doesn't also involve alcohol, drugs, or sleep loss. In fact, it’s possible that sex may even enhance athletic performance by helping people relax.

But much remains unknown, including whether women are affected differently than men. It’s likely that the impact of sex on physical activity varies from person to person.

If you’re wondering whether sex counts as exercise, it depends on the length and intensity of your lovemaking. A study of young adults found that sexual activity burned, on average, three or four calories per minute. (Men burned more than women.) The level of intensity was considered moderate, comparable to that of walking or doubles tennis.

For most people, however, sex doesn't last as long as those other activities, which means it burns fewer calories overall. In the aforementioned study, when sexual activity was compared to a 30-minute, moderately intense workout on a treadmill, the treadmill burned about three times more calories. But sexual activity did come out ahead in one measure: Nearly 100% of participants rated it as more enjoyable.

Adapted from Fitter Faster: The Smart Way to Get in Shape in Just Minutes a Day (AMACOM) by Robert J. Davis with Brad Kolowich, Jr.

This article originally appeared on Health.com.