There are two main reasons that a cat would spend an inordinate amount of time lying in his litter box: He's sick, or he's stressed about something. If a cat is lying in his litter box more than usual, pet owners should take notice of the behavior and consult a veterinarian.
If a cat is ill and lying in the litter box, it could mean a number of things. He might just generally not be feeling well. He could also have a urinary tract infection, a digestive issue or be constipated. Male cats in particularly can develop a lower urinary tract infection where crystals form in the urine and create a blockage that doesn't allow urine to flow freely. If this happens and is untreated, it may lead to death. Cats may also sit or lie in their litter boxes because they see it as a safe place. If a cat is feeling scared or stressed out, the litter box may serve as a refuge. Take inventory of the cat's behavior and how he interacts with other animals or if anything about his daily life has changed which could cause stress. Potential causes of stress in cats include a recent move, new people in the house or being bullied by another cat.