At some point after leaving the computer for the day. Preferably soon after. Try to conceptually pack what you're working on away somewhere, reassuring yourself (and the work) that you'll pick it back up tomorrow morning.
The additional rest this gives you. Will optimise your ability to problem solve the next day.