Cats pee on the bed, or anywhere outside of the litter box, as a result of an illness, distaste of the litter box or emotional stress. A deeper look into the cat's well-being usually helps pinpoint the cause and correct the behavior.
Illnesses that affect the urinary tract often lead to painful urination, which the cat might associate with its litter box. Other illnesses cause loss of bladder control.
Some cats refuse to use the litter box if they do not like the litter, the type of box, the location of the box or the fact that the litter is not clean.
Some cats spray urine to mark their territory, especially when the owner introduces a new cat, a new member of the household or new surroundings. Some cats spray out of frustration with a situation, such as a restrictive diet or too little play time.