Exercise. Lifting weights, running, playing tennis/football/basketball/etc. In college I used to mentally review and visualize algorithms and other CS concepts during long 10+ mile runs. I always came home with new insights. Even if I'm not thinking anything technical, after exercise I'm always mentally invigorated. Also a good night's sleep will improve every aspect of your life.