Modafinil is a prescription medication commonly used to treat sleep disorders such as narcolepsy, shift work sleep disorder, and obstructive sleep apnea. It is classified as a wakefulness-promoting agent and is known for its ability to enhance cognitive function and alertness.