Written by Colleen Oakley for Vetstreet

It's nighttime and your pup nestles snugly in his bed, rolled up tight like a drum.

It's a common slumber position for dogs, but why? Wouldn't it be more comfortable to stretch out while catching some shut-eye?

Well, yes, says Dr. Margaret Gruen, D.V.M., a clinician at NC State University College of Veterinary Medicine Animal Behavior Service.

But there are two valid reasons why your canine rolls up in a ball to snooze -- and they both relate to evolution.

More from Vetstreet:
Should Pets Sleep on Your Bed?
10 Surprising Things About How Animals Sleep
Why Does My Dog… Sleep Belly Up?

Keeping Cozy
"When dogs sleep in the wild, especially where it's cold, they'll dig a nest and curl up into it," Gruen says. "This gives them warmth -- tucking into a ball conserves body heat. It also protects their most vulnerable organs in the abdomen from would-be predators."

So if your pooch sprawls out to nap -- instead of curling up -- he's either hot or he feels very safe in his environment.

Creating Security
If a dog is in unfamiliar territory, he will revert back to the instinct-based, curled-up sleep position.

For this reason, whenever you bring a new pup home, you'll want to give him enough space to acclimate to his foreign surroundings.

Another tip from Gruen: Consider getting him a blanket. "This way, he can 'dig' a nest with the bedding material before he lies down," she says, "instead of digging a place to nowhere on your carpet or couch."

For more on pet health, click here.

Related on HuffPost: