It could be an indicator that the cat is feeling stressed so it stays in a place where it feels safe.
It also could be an indicator that the cat has a urinary problem or even a blockage. Keep an eye on the situation and monitor if the cat is passing any urine as a blockage can be fatal.