What Merlin Fraser has said is right on.
I often find that I just cant write, and end up sitting in front of the computer for hours doing nothing, or write utter rubbish and have to then spend ages correcting it.
The only thing to do is get out, get away from the computer and get a change of scenery. Its all too easy to be hunched in front of the computer for hours, days, even weeks without a proper break and no one can keep going indefinitely.
How long it takes is another matter. I find if I finish early, get out of the house and try again in the morning, that's enough. If its not, take the weekend off and don't even touch the computer!
If you are on a deadline - get out for an hour and do some exercise. It helps to clear the head!