There is a lot of medical literature that suggests a link between sleep apnea – a condition where people stop breathing at night – and ED. I was reading an article today (LINK HERE) that shows treatment of sleep apnea with CPAP (continuous positive airway pressure) helps men with erectile dysfunction (ED) after 1 month. They also reported that men with less oxygen during sleep had more ED.
Bottom line: If you have sleep apnea, get a CPAP mask. If you have a mask, use it every night!