Sleeping on its sides usually indicates that the dog is napping. During which, it is well aware of its surroundings, but simply doesn't wish to participate. Well, unless there's crinkling of food wrappers involved. You can even find your puppy snoring, twitching, and having REMS (Rapid Eye Movement Sleep) while sleeping on its side. But don't be fooled, even in this state, it's listening to your plans of giving it a B-A-T-H or taking it to the V-E-T.
A dog generally sleeps in a curled up position to protect its internal organs from predators. It also conveys a message that it doesn't wish to interact or be disturbed. You'll often find a dog with short or single coat fur curled up. This helps to conserve its body heat. It also indicates that the dog is feeling cold.
Now, this is a popular pose wherein a dog sleeps on its back with all its paws up in the air. This often indicates that it is in for a long, deep slumber. Sleeping on the back ensures better sleep for the dog as it helps to keep itself cool and ensures that its muscles and belly are completely relaxed. You might even observe that your puppy is dreaming, barking softly, having rapid eye movement (REM), twitching, whining, kicking, and at times, even running in its sleep.