I recognize the same thing in myself, and have realized that I go in cycles. Sometimes, I just don't have it in me. For instance, I tinker with electronics in my spare time, and I'm building a synthesizer. I've got it all designed, it works on my breadboards, and I just need to take the time to solder it to a PCB. Soldering is my favorite part of the electronics process, too. But yeah...after a day of work, no matter how much energy I have, I just can't bring myself to get to soldering. I realize that my productivity goes in cycles, and right now, it's time for me to take a break.
That may be what's happening with you. When your work and your hobbies are the same, it's very easy for an imbalance to occur. But think of it this way...I may love cheeseburgers, but eating cheeseburgers and nothing but cheeseburgers all the time may not be the best option for me.
You say you go out and have other interests...that's good. Maybe right now your brain is telling you to engage in those activities more fully so it can recuperate from thinking in code all the time.
If you're able to set aside some personal projects for the time being, concentrating ONLY on the critical programming you NEED to do, force yourself AWAY from the computer (no e-mail, no online Scrabble, etc.) when you're not working. I've found that this trial separation gives me time to process my on-hold projects in the background, and I return to them with fresh and innovative ideas when the time is right. You'll know when that time is.
That's my 2 cents. Good luck!
UPDATE: I just ended up posting an answer here that, in retrospect, might be relevant to focusing as well. It's about environmental factors that cause me to lose focus.