To illustrate, if I got a full night sleep, then took modafinil, I would be up for easily 18 hours without feeling any urge to sleep...which seems great until it's 5am, and you need to be at work again in 4 hours.
The apparent solution to the problem is just take modafinil again in the morning. This worked for a while, but there's a limit to how much modafinil can cover a sleep debt. While modafinil had a strong effect preventing the symptoms of sleep deprivation, it had an even stronger effect blocking the capacity to sleep. Modafinil can lead to a very strange and unpleasant feeling of desperately needing to sleep and not being able to.