Dogs curl up in a ball to sleep on an age-old instinct to keep themselves warm and protect their vital organs from predators.