Scientists may have cracked the answer to one of the great mysteries of the animal kingdom: why do cats sleep in cardboard boxes?

Anyone who lived with a cat has probably come home to find their feline companion sleeping in a strange place. Carelessly discarded cardboard boxes are as good as any.

According to a series of scientific studies collated by the website Wired, there are two broad reasons why felines crave their own little cardboard castles.

Another cat in a box (Creative Commons / Parnell27)

The reasons are primarily that boxes provide shelter from stress, and that they keep cats warm.

According to a study conducted at Utrecht University in the Netherlands, boxes make cats less stressed because they are less likely to be pestered when hiding in them.

In the wild these small hiding places would have been a place to relax away from prey, but in a modern home puss is more likely to be avoiding an unwanted stroke from an owner.

Yet another cat in a box (locus15 / Creative Commons)

Alternative places cats can hide include under tables and chairs, where they can’t be annoyed or pestered.

Another set of research conducted in 2006 by the National Research Council found that boxes can help keep a cat warm.

Cardboard boxes are usually made of multiple layers of card to provide strength, which makes them a good insulator for cats trying to keep out of a cold draught.

The animal psychology behind keeping warm in a box is similar to why cats sleep on cushions or why they like to lie in the sun rather than the shade.