Around the world, millions of cats are housed in temporary rescue shelters. These are the world's discarded, lost, abandoned or abused cats.

Many are waiting for a new home, but they can be difficult to re-home. Most of these cats have been through very stressful situations, and they don't make for cute, cuddly family pets.

Some of them hiss, scratch and bite. Many need days or months of careful rehabilitation. Some never quite lose their fear of strangers.

The situation is made even worse by the stress of staying in a rescue shelter. Prolonged stays can take a toll on a cat's mental health.

To give each cat the best chance, their carers must make its stay in the shelters as stress-free as possible, to prevent its health from getting even worse. That means we need to understand how and why cats get stressed.

A team interested in cat welfare has been looking at how cats behave when they first enter confinement. They wanted to understand just how stressful these situations could be.

To do so, they looked at 20 domestic house cats, most of which had been acquired by their owners as kittens.

First they evaluated each cat giving them stress scores ranging from low to high. They then monitored how the housecats behaved when they were housed in shelters. 

Highly stressed individuals seemed to want to do nothing but hide away from it all

Lead author Lydia Rehnberg of La Trobe University in Melbourne, Australia has spent time working in cat rescue shelters. She witnessed, first-hand, how big a difference caretakers can make to a cat's wellbeing.

Looking at how cats behaved when confined, the team found that stressed cats showed a pattern to their behaviour.

"Although cats had access to a fairly large room, they almost exclusively chose to spend their time in the cat igloo [a hiding spot] or a vertical climbing post," says Rehnberg.

The more stressed the cats were, the more time they spent in the cat igloo. Cats that were more confident and relaxed spent more time on the top of a climbing post. 

"Highly stressed individuals seemed to want to do nothing but hide away from it all, whereas less stressed cats seemed to enjoy perching and scanning their environment from above," says Rehnberg.

The team found that highly stressed cats were extremely passive. Often, they did nothing at all. "A cat with high stress scores suppressed almost all of its normal behaviours and could be crouching in one spot for hours and hours," says Rehnberg.

Cats are sensitive creatures that can pick up on very subtle things in their environment

This was in stark contract to cats with low stress scores, which behaved normally. Usually, cats are playful and adventurous creatures. Many actively seek out social contact with humans and other cats. 

Cats which scratched or meowed loudly were also less stressed. These seemingly "freaked out" cats were found to have lower stress scores than their more passive counterparts.

"Many people may think, intuitively, that the cats that protest loudly are more strongly affected by stress and the quiet ones that crouch in the corners are 'doing fine', but it appears to be quite the opposite," says Rehnberg.

The team published their findings in the journal Applied Animal Behaviour Science.

To find out how cats would benefit from intervention, the team assigned extended care and interaction to half the cats in the study. Cats which received this extra care were less stressed in their second day in confinement.

That suggests owners and caretakers can alleviate a cat's stress by doing relatively simple things.

This includes things like approaching a cat slowly, crouching down to their level, allowing them to become familiar with your scent before touching them, and even speaking in a positive and gentle voice.

"This may seem trivial but cats are sensitive creatures that can pick up on very subtle things in their environment," Rehnberg says.

Cats do get used to being confined to a small enclosure, but in the long run it is harmful. Many months in a rescue shelter will inevitably affect a cat's physical and mental health.

Confinement should therefore be as brief as is possible, the team says.

However, this is not always possible. Nor is there enough demand to rehome all the cats housed by rescue shelters. Those that are unwanted are often put down.

To prevent this, Rehnberg says that cat owners, where possible, should neuter their cats. This reduces the chance that they, or their unwanted offspring, will end up in a rescue shelter.

Follow Melissa Hogenboom and BBC Earth on twitter