What I do is to sometimes take a 'sanity day' to sit at home or in a library and get some serious work done. 9-5 (or whatever) just like work. You even get to sleep in instead of commuting. I realize that this is partially because I've been lucky to have jobs where taking one day won't be a vacation/sick-day disaster-overreach.