Modafinil is a stimulant. It is mainly used to treat narcolepsy and some cases of sleep apnea. The drug was developed in the 1980s. It is sold under different brand names, as well as generic drugs. Usually it is a prescription drug. As there are signs that it causes birth defects, it likely should not be taken during pregnancy.