Modafinil is a prescription medication used to treat sleep-related disorders such as narcolepsy, shift-work sleep disorder, and obstructive sleep apnea-related fatigue. It works by promoting wakefulness and improving daytime alertness. Because it is a regulated prescription drug, Modafinil can only be obtained legally with a prescription from a licensed clinician.