Before lying down, dogs often circle their beds or wherever they've chosen to settle in for a nap. This curious canine behavior dates back to prehistoric times , when dogs literally had to make their own beds.

Although domesticated dogs have adapted to living with humans and can easily be housetrained, they've still retained some of their wild ancestors ' survival instincts.

"This behavior was hard-wired into the dog's ancestors as a way to build a safe 'nest,'" Leslie Irvine, author of "If You Tame Me: Understanding Our Connection With Animals," told Life's Little Mysteries.

[Dogs Poop Along North-South Magnetic Lines]

Doggy beds and pillows haven't always been around, so wild dogs had to pat down tall grass and underbrush to make a comfortable bed for themselves and their pups. The easiest way to prepare that night's sleeping area was by walking around in a circle.

The rounding ritual may also have served as a safety precaution. "In the wild, the circling would flatten grasses or snow and would drive out any snakes or large insects," said Irvine, a sociologist at the University of Colorado at Boulder who specializes in the role of animals in society.

"I have also heard that circling the area and thus flattening it leaves a visible sign to other dogs that this territory has been claimed," Irvine said. "Even though our dogs now sleep on cushions, the behavior endures."

Got a question? Send us an email and we'll crack it. Follow Remy Melina on Twitter @RemyMelina