I suppose it depends on the person. In the past, I’ve tried to just be disciplined, stop procrastinating, and push through no matter what, and it lead to horrible burnout where I spent weeks/months being fairly ineffective. If you’re not sleeping at all at night and can’t think straight during the day, even for a couple minutes, you’re simply not going to be effective. You’re also liable to make really bad decisions that will drag on you even after you’ve recovered.
These days I try not to worry too much about procrastination, and get as much done as I can. I’ve found lots of little tricks to squeeze out more productivity here and there. If I’m in a situation where I just need to buckle down and push through, I will, but I’m not going to risk pushing myself over the edge when it’s not necessary.