When I was in high school, my tendency to wait until the last minute and scramble evolved. I wrote some papers that turned out well by staying up all night. But then it stopped working well. And then it stopped working. I'd stay up all night trying to force myself to get started. Then I'd go to school feeling like hell. Then later it was that I'd go to school and get punished in every class for everything. Because I was too out of it to manage the frustration of choosing which I'm-way-behind-on-this pile to start, and then find a working pencil. And then use it. And keep using it. So I was in a painful free fall for a while.
What happened was that my HPA axis got overwhelmed and numbed. This is typically called depression. You experience so much panic that in exhaustion you stop responding even to panic. It's like a drug tolerance, only the "drug" is adrenaline or panic - what you were previously relying on to kick you into gear. For a while caffeine - or even the initial boost of missing a first night of sleep - can perk you back toward pseudo-normality. But then it doesn't really work either. Then nothing works. (It's like kicking a dead horse, only "kicker" is the world, seemingly all of it, and "horse" is you.)
So - it turned out I had a sleep disorder - I'm not just a night owl but kind of irregular about that, too, so it's tough to schedule - I also can't keep to much of a consistent pattern. And it turned out I'd run into major depression. Obviously.
But the core of what was going on there was actually ADHD. That took me longer to ascertain. (Even after the diagnosis, I wasn't sure for many years.)
Staying up all night to try to force yourself to focus, using caffeine, and not even managing to focus and get it done. Doing this many times and hating yourself for it.
That's ADHD. It sucks.
But it's also kinda cool in some ways - I mean, if it doesn't kill you, etc.
I just did exactly the same thing with a job interview I'm about to call off, because I'm tired and have prepared nothing and am not into masochism actually. If it'll be like this the first time, knowing me it isn't going to get much better. If I couldn't put the slides together last night, in this case that's because I don't give a fuck about putting together slides and I cannot manufacture giving a fuck about slides. If I did care about these particular slides enough, I might have done it - might have. But I know that I do not care about them. That bodes poorly for the job. To do the job, you have to actually do it - and be able to get yourself to do it with some kind of predictability.