Well, what 07weber said is good, but sometimes they go in the litter box when they don't feel safe. If your cat is a spas like mine was, and doesn't really like it when there to many people around, they go in there when they don't feel safe. So if she is a spas, try to make her feel like shes loved. And if shes not, shes just bored!
Why Might The Cat Be Laying In Her Litter Box When She Is Not Going To The Bathroom And How Do We Correct This?
Our cat does that too. We found the answer. They lay in their litter box because they are board. You have to give them enough attention and they will stop it. If your cat does something that is bad get a spray bottle and spray them with water. They will learn.
My 6-year-old cat lies in the litter box before, during and after severe storms. It only started lately though, and he's otherwise healthy. I guess he sees it as a safe haven.