I have experienced the same thing. I can't figure out why it is this way though from a biological/neural perspective. When I'm getting tired of work I usually just step back for a few days and just do fun stuff like watching movies, playing video games, and in general just doing stuff completely unrelated to work. Magically, after a few days of routine that's unrelated to work, when I get back to it everything just seems more manageable.