Well, as with anything else, perhaps you need a break in your routine. Shake things up a bit, rearrange your schedule. Take a walk, or a drive. Do something to take your mind off the coding, then come back to it later.
Sometimes focusing on one thing for too long becomes counterproductive. You get less and less done, and you have to move on and let your mind rest for a while.