Leave out a cardboard box — or plastic bin, shoebox, you name it — and it seems like your kitty always makes her way inside. Turns out there’s a real scientific basis for this (beyond just to look cute), and it teaches a valuable lesson to anyone who wants to keep their cat happy.

Sometimes it’s hard to remember that sweet felines evolved from wild animals, but they’ve got deeply rooted instincts as both predators and prey. As predators, cats love to treat boxes like their own personal caves — secluded, dark hideouts where they can stalk prey (or toys, or you as you pass by…) and pounce at just the right moment.

But these enclosed spaces also give cats a tremendous sense of calm and safety; they allow cats to hide from potential threats, loud noises, and other startling activity. Cats struggle with conflict and, in a fight-or-flight situation, they tend to flee. One study by Dutch scientist Claudia Vinke found that cats who were given boxes experienced reduced stress levels because they were better able to adapt to new surroundings and circumstances.

There’s another practical reason cats like to hide away in boxes (especially the small ones). According to the National Research Council, cats are comfiest at temperatures between 86 and 97 degrees; chances are, you like to keep your home well below that. Corrugated cardboard holds heat very well, and tiny spaces allow cats to bundle up and conserve their own body heat.

Want to make your cat extra-happy? Save that next cardboard box from recycling and set it aside for him. Try setting it on its side, cutting small holes to enable him to look out, adding a cozy blanket, or hiding treats inside. Your cat will have hours of fun!