There are several reasons why cats wet the bed:
First, cats in heat will urinate more frequently in order to attract mates, which may result in them urinating on the bed.
Secondly, cats may experience stress reactions due to a bad mood or being frightened, and sometimes they will mark their territory with urine to vent their emotions or show ownership.

In addition, if the cat has not developed good elimination habits, or if the litter box is not clean or in an unsuitable location, it may also cause it to defecate on the bed.
Finally, certain medical conditions, such as urinary tract problems, can also prevent cats from urinating normally, leading them to relieve themselves on the bed. Therefore, addressing bedwetting in cats requires a comprehensive consideration of the cat's behavior, health, and environmental factors, and the implementation of appropriate measures.