While puppies often shake or twitch in their sleep for natural, harmless reasons, it can sometimes indicate discomfort or sickness. If you notice that your pup tends to shake and tremble while he's snoozing, keep an eye on his behavior both during sleep and his waking hours so you can determine if he needs veterinary attention.
Dogs go through the same stages of sleep that people do, and that means they dream. Sometimes these are pleasant dreams, and sometimes they're nightmares -- either way, they can cause your puppy to shake, twitch, kick his little legs or even bark and whimper in his sleep. Puppies are especially prone to vivid dreams that manifest physically like this, but if you're concerned, gently call out to him to rouse him from his slumber.
Various illnesses can cause your puppy to shake and tremble, both while he's asleep and when he is awake. Generalized tremor syndrome, for example, can start to show symptoms when your pup is as young as 9 months old. Eating something poisonous, like chocolate, can also cause tremors in your puppy -- even chronic kidney failure can make his body uncontrollably shake at all hours. If you notice that he's trembling not just while sleeping, but while awake as well, contact your veterinarian.
If you come across your puppy and he appears to be shaking and asleep, he may actually be suffering from a seizure. Monitor the severity of his shaking -- if they are small, jerky movements, he is likely asleep. If his body appears stiff and his shaving is severe, and if he does not respond to you calling his name, contact your veterinarian immediately -- these are the signs of a seizure, and your pet may be unconscious.
Just like people, dogs shiver when they're cold -- especially dogs who are not well-insulated for cooler temperatures, like pugs and Chihuahuas. Puppies are especially sensitive to the cold, so if you notice that yours is shaking and shivering in his sleep, he may be struggling to stay warm. Increase the temperature in your home if you can, or dress your puppy in a sweater and/or drape him in a blanket.