We have already covered how Sleep Apnea Leads to Erectile Dysfunction. However, sleep apnea is a very severe sleep disorder where the patient is often woken hundreds of times during the night. So what happens when a guy has a more mild sleep disorder? Can those affect erections and possibly lead to impotence as well?
Study after study has showed that is exactly the case. Almost every sleep issue that you can think of will put the brakes on your sex life in one way or the other.
Most guys think that it's only what they do or do not do while they are awake that affects their bedroom prowess. Below we document that pillow time is every bit as important:
1. Restless Leg Syndrome. A study of over 23,000 senior men with RLS showed that those with symptoms 5-14 times per month and 15+ times per month were 16% and 78% more likely to experience erectile dysfunction, respectively. 
2. Snoring. Yes, just snoring, particularly heavy snoring, was associated with sexual dissatisfaction according to one study of 800+ senior men.  It is also doesn't do a lot for your partner sexual desire either...
3. Narcolepsy. Narcoleptics often experince extreme sleepiness during the day resulting in a loss of libido and/or erectile strength. Erectile dysfunction rates in this population have been estimated from about a fourth or fifth of men up to about half. Furthermore, many of the drugs (SSRI's, psychostimulants) have erectile dysfunction as a side effect as well. 
4. All Sleep Disorders. One study of younger men found looked at any and all sleep disorders. They found that virtually any and all were associated with erectile issues. 
The bottom line is that anything that decreases sleep will likely negatively testosterone, neurotransmitters and energy levels the next day. Plus, good evidence shows loss of sleep leads to insulin resistance, arterial plaque and other long term risk factors for impotence as well.
1) Sleep, 2010 Jan 1, 33(1):75 79,"Restless Legs Syndrome and Erectile Dysfunction"
2) The Journal of Sexual Medicine, Apr 2008, 5(4):898-908, "Snoring as a Risk Factor for Sexual Dysfunction in Community Men"
3) Sleep, 1986, 9(1 Pt 2):227-31, "Erectile dysfunction in narcoleptic patients"
4) The Journal of Sexual Medicine, Jul 2005, 2(4):543-550, "Association between Erectile Dysfunction and Sleep Disorders Measured by Self-Assessment Questionnaires in Adult Men"