Modafinil may allow you to skip huge chunks of sleep. One study suggested that modafinil could help you stay up for 40 hours without impairment and without accumulating a sleep deficit. But more recent trials have not been able to confirm that finding, according to the NYU Sleep Center's Walsleben.