Well, I have theories. One, it breaks habits. You may have teached yourself over the years to procrastinate during the day, but not during the night.
Two, you know it's painful enough that you'd rather not waste the time doing something stupid and worthless.
Three, it lowers your mental state enough that you'll just drudge on like a robot.