I would imagine it’s because of some kind of skin irritation. What can they do? It’s not like they can go in for a massage or tell their owner, “Scratch this spot here.” A lot of dogs will also shake when they wake up. They yawn, they stretch, and then, often, they shake. I think it’s just getting the body moving again. But with all of these “Why do dogs?” questions, we never actually know why they’re doing what they do and it would crack me up if, when we go to that place in the sky afterwards and I meet my dogs, they say, “You were so wrong. We shake because we were dreaming that we were underwater and retrieving ducks. I woke up and I had to shake the water off!” We can give an educated opinion, but we never know for sure.