This behavior, aside from being just plain adorable, has a fascinating evolutionary basis.
When dogs sleep in the wild, they often dig a nest and tuck into a ball to conserve body heat. Curling up also helps protect their vulnerable organs — the ones inside the abdomen — from potential predators. This doesn't necessarily mean that your dog feels unsafe in his bed; it could just be that he happens to have the same sleeping preferences as his ancestors!
So what about dogs who sleep on their backs? Dr. Patty Khuly says this sleeping position might signal that your dog feels extremely relaxed and comfortable in his environment, with no need to protect his organs. It could also mean that he's hot and doesn't need to curl up to conserve body heat.
Now here's a sleeping habit that may startle you the first time you see it! Some dogs twitch while they're asleep and maybe even vocalize a little. Is your dog dreaming about chasing a squirrel? He may be. Experts theorize that dogs dream during the REM (rapid eye movement) stage of sleep and may act on their dreams by twitching or "running on their side." If you need to wake your twitching dog, gently call out his name. Using your hand may scare him, and you could get bitten.
Whether or not your dog snuggles under the covers at bedtime may just be a matter of preference. Animal behaviorist Dr. Brenda Forsythe says experts' theories for this behavior range from a dog's need to feel companionship while sleeping with a human "pack member" to an evolutionary behavior from when wild dogs raised their puppies in small, dark dens. Crawling under the covers may actually be more common in breeds that were bred to burrow, like Dachshunds.