It is also used to help you stay awake during work hours if you have a work schedule that keeps you from having a normal sleep routine (shift work sleep disorder). This medication does not cure these sleep disorders and may not get rid of all your sleepiness. Modafinil does not take the place of getting enough sleep. It should not be used to treat tiredness or hold off sleep in people who do not have a sleep disorder. It is not known how modafinil works to keep you awake.