Even more innocently, your dog might just be shaking because he's dreaming! When dogs dream, they will often move their legs as if they're running, and offer twitches and shakes in response to what they are dreaming about.
This is evidence that they are deep in rapid eye movement (REM) sleep.