I do this by going to the water cooler for a refill. I use a small cup, so I go every hour or so. I usually take the slow way there, and think about my work on the way.
Before I started working from home I would sometimes get up and pace. Fortunately we had an empty part of the building where I didn't disturb people. I felt a little self-conscious about it at first, but being eccentric is sort of fun. :-)