Why Do Cats Sleep on Their Litter Boxes????
Well, I think it has more to do with security than anything else.
Cats - particularly indoor, domestic cats, equate their litter boxes with security more than a child does their blanket or thumb! A cat having control over it's litter box means the cat is safe.
Food may or may not be forthcoming, but a litter box means it can urinate or defacate without worrying. Cats normally bury their waste, so they are not sleeping directly on the soil. In some situations, control over a litter box means control over other cats; place holding in the pecking order.
My lady-kitties from rescue: Fluffy, Bugs and Queenie, were all raised and living in cages when I got them. They all slept in their litter boxes. Especially Fluffy, who was in a cage by herself, and had no room to move or lay down except in the litter box.
If your cat is sleeping in the litter box, perhaps you should look at how secure your cat feels in her home. Is there a child or other animal threatening or pestering her? Is she being prevented from access to the box? Address these problems and your cat will feel more secure. Provide a quiet place for the litter box and a bed nearby. You should see a positive change in behaviors in a day or so.