I have an older cat who has either IBD or small cell carcinoma in his intestines. Given his age we did not do a biopsy since we were told the treatment would be similar--starting with prednisolone. The only symptom is defecation outside the box! At first it was "running poops"--the kitty seemed to need to run to defecate. For a while prednisolone has helped; then we put him on venison food and that helped for about 3 weeks but now he is defecating outside the box again. He is 15. He urinates in his box just fine. He has two boxes but sometimes defecates on our bed or near our bed. I am at wit's end! He seems fine otherwise; eats well, plays, etc. Thank you
Unfortunately many cats react to stress by urinating or defecating to express discomfort with a situation. It can be a houseguest over the holidays, or numerous other things that are causing a change in its routine.
In his case it could be having to take medication or even a physical discomfort that his condition is causing. You could try moving one of the litter boxes into the bedroom at night to see if the behavior changes.
Animals can't tell us what is wrong and to communicate there is a problem, they often resort to behaviors that will get our attention.
I suggest you talk to your vet about a medication to reduce his stress and see there is improvement.