I find that if I go for a walk with some chill music, I can redirect my mind away from the code that is stumping me.
Usually an extreme case of the "mushy" brain, is because I have been spinning my wheels on a problem, and I can't seem to think outside of the box to find a better solution. What seems to work the best for me, is taking a 15 min break, and then coming back and explaining the code to someone. This usually gives me an "Aha!" moment, and my brain becomes less mushy, and sad.