Modafinil is in a class of drugs known as central nervous system (CNS) stimulants, which alter brain activity to promote wakefulness. This medication comes in tablet form and is usually taken once a day in the morning. Common side effects of modafinil include back pain, headache, nervousness, and nausea.