If you’re treating your sleep apnea with a CPAP or APAP machine, small doses of melatonin can help support your sleep onset and help you get to bed more quickly. You may need a slight pressure increase to keep up with the effects of melatonin, and over time you may need less, as CPAP therapy has been found to naturally increase melatonin production.