In general, multitasking doesn't work for complex tasks like coding.
But I often find it useful to, say, spend 15 minutes coding, then 15 cleaning. So I never hit my head too much either way.
Mark Taimanov, a chess grandmaster and concert pianist, said "when I'm playing chess it's a vacation from concerts, and vice versa." And that quote has stuck with me.
It's ideal if we can pace ourselves this way, and I don't always, but it works well when I do.
Does anyone else do this, too? Or have any other tricks to keep things fresh?