It happens to the best of us: It’s way past your bed time, but you find yourself staring at the ceiling, tossing and turning, hoping in vain that sleep will creep up on you any second now. Sleep may eventually come, but you’ll pay the price next morning: Bloodshot eyes, yawns a plenty, a constant yearning for a nap. Yep, you didn’t sleep well and now you’re feeling seriously fatigued. But to add insult to injury, consistently not sleeping well doesn’t just affect your ability to stay awake; it can also end up killing your sex life.

For men that struggle with sleeping, the body can often feel too tired to get down to business between the sheets. Even if you genuinely want sex, your body, deprived of sleep, can’t muster up the focus to help you perform. This leads to signals from your penis to the brain for an erection get lost in the jumble of fatigue, leading to you wondering why you can’t get it up.

Even if you manage to catch a couple Z’s every now and again, you may still struggle to achieve an erection. When sleep deprived ED becomes consistent, you may run into problems getting an erection due to nerves over the problem happening again, even if you’re fully rested. In essence, even if you sleep, you’ll become self-conscious over the problem happening again, leading to the problem happening again, essentially dooming yourself to a vicious circle.

Thankfully, the solution for sleep deprived ED is simple: Get more sleep. But for men that struggle to sleep, this is a solution that is a lot easier said than done. Speak to your doctor about potential ways to improve your sleep, or invest in some sleep aids. Once you’ve gotten your sleep schedule back on track, your brain should be able to focus once more, and your erection should return to normal.