So you're midway through foreplay with a half-naked woman, and suddenly you realize that your penis is chilling at half-mast, taking its sweet damn time to achieve its full potential.

You panic. It's like one of those dreams where you're stuck in some terrible post-apocalyptic scenario, your feet cemented to the ground, as impending doom encroaches. They're one and the same—except one of those nightmares involves a disappointed half-naked woman.

There can be a number of reasons why you're going soft, according to Los Angeles-based urologist Philip Werthman. The strength and vigor that once characterized your erections can turn limp from hormonal imbalances caused by weight gain or stress. You're not alone—a 2013 study published in The Journal of Sexual Medicine found that one in four patients seeking help for new-onset erectile dysfunction is under the age of 40—and you can reverse ED without medication by tweaking your lifestyle, per the University of Adelaide.

Note: If this is the first or second time you've had a failure to launch, don't sweat it, Werthman says. But if your weak erections persist—and the reason for them isn't obvious—it's time to see a doctor, stat. "Erectile dysfunction can be the first sign of a serious problem, like heart disease, " Werthman explains. "Your primary physician or a urologist—not an erectile dysfunction 'clinic’—will be able to determine if there's something bigger at play," he adds. 

Here are 7 of the most common revelations your weak erections are exposing: 

1. You're seriously stressed

Stress is the biggest erection killer in younger men, Werthman says. It's hard to get down and dirty—and get it up—when your attention keeps breaking from sex, sex, and more sex to that looming work deadline. If you can't identify any major stress points—such as a new job or an unexpected dip in your emergency fund—take a look at your relationship. According to a 2006 study published in the Journal of Nervous and Mental Disease, "internal" stress (stress that originates from within a couple) is more likely to impede your sexual life than "external" stress.

2. You're a nervous wreck

The first time you have a less-than-stellar erection can haunt your future sex-capades thereafter. It's called performance anxiety, and it's a vicious cycle. If counseling or therapy isn't in your budget, try working out. Blowing off some anxiety in the gym, clearing your mind with some yoga, and getting the jitters out with a run can all bring you to a good place, mentally and physically. Plus, you're amplifying circulation, which is absolutely essential for a strong, healthy erection. Also, talk to your girlfriend. Awkward things happen and go wrong during sex—talk about it, laugh about it, and then move on.

3. You don't drink

You've probably heard that moderate drinking can be good for your heart, but it also does wonders for your penis. According to a 2009 study published in the Journal of Sexual Medicine, men who drink alcohol on a regular basis (even binge drinkers to a certain degree) are less likely to have erectile dysfunction than men who don't drink or who no longer drink. In fact, when researchers adjusted for age, cardiovascular disease, and smoking, they found the difference was 25-30% for guys imbibing 1-20 drinks per week.

Err on the lighter side, though; too much can screw you over. (More on that in a moment.)

4. You drink way too much

Heavy drinkers are no stranger to "whiskey dick," nor can they expect to maintain a stellar sex life. Alcohol is a central nervous system depressant, which means it slows everything down—including blood flow to your penis, Werthman says. A 2007 study published in the Indian Journal of Psychiatry found that heavy drinking increases the risk of sexual dysfunction, including premature ejaculation, low sexual desire, and erectile dysfunction. The researchers studied 100 men with alcohol dependence and found 72 of them experienced one or more types of sexual dysfunction. 

But there is some good news: A 2011 study published in the British Journal of Urology International found that men who successfully quit smoking experienced improved erections and were quicker to reach sexual arousal than they had prior to quitting.

5. You're losing your hair

Or rather, you're trying to keep what's left of your thinning, disappearing hair on your head by taking the prescription drug finasteride (commonly marketed as Propecia). The FDA warns finasteride may cause sexual side effects, including a loss of sexual desire, inability to ejaculate, and difficulty reaching orgasm; and a 2012 study published in The Journal of Sexual Medicine suggests these sexual side effects could persist for years. But you should take those results with a grain of salt—that study had a small sample size of just 54 men, whereas a 2003 study (with a larger sample size of 3,040 men) published in the Urology Gold Journal found that the sexual side effects of finasteride only persisted for one year.

The bottom line: What's in your medicine cabinet could be affecting your erections. Other drugs to look out for include drugs that lower blood pressure, anti-depressants, and muscle relaxants, according to Werthman. 

6. You're tipping the scale

Obesity is another all-too-common reason for erectile dysfunction in younger men. It's not just "being fat" that hurts your erections, Werthman says—it's the side effects from obesity, like hormonal imbalance (fat produces estrogen), diabetes, high-blood pressure, and heart disease. The answer here is simple: Lose weight and get in shape. Try this weight-loss plan for heavyset guys to get started.

7. Your testosterone levels are low

If it's not just your erections that are taking a nose-dive, but also your libido, you might want to have a doctor check on how your testosterone levels are doing. Low testosterone is more common than you might think, and it can be a result of aging, not sleeping enough, poor food choices, and weight gain. There are plenty of natural ways to boost your testosterone, but the first step is to get some bloodwork done so you can work out a plan with your doctor, Werthman says. Try these testosterone-boosting workouts and foods.