I consider myself to be extremely fortunate -- my morning commute is about 15 steps. It's further from my pillow to the bathroom than from my pillow to my desk. So, naturally, I check my email on the way to the bathroom. Who wouldn't?
If the solution to a vexing problem comes to me in the middle of the (sleeping period which isn't always night) I can just get up, hack a few lines, test, and if things go well, return to bed for a very restful sleep. OTOH, sometimes those vexing problems are too engrossing, and I work myself into counterproduction. I strive for balance, but I don't always maintain it.
It still beats working for wages!