well, yes.
chances are it's a behavioural thing, but cats peeing / crapping in odd places can be a sign of some sort of medical problem.
I know they aren't yours, you were catsitting? Or whoever posted was catsitting? Sorry if I have quoted the wrong thing (I can be a bit rubbish at that sometimes)
I'd recommend to their humans a vet visit to rule out any medical problem, but most usually shitting on the bed is a sign that they are afraid of a cat or other animal lurking outside, or some other territorial disturbance in or around the home, or a change in the smell of things.
The bed is seen as the safest place (the big squishy humans sleep there, so it is seen as a safe area), and shitting on the bed (ie in core territory, even if it messes up where they sleep) is a sign that they are scared to leave themselves vulnerable by squatting elsewhere, and have decided to basically just shit where they sleep because they are scared to do it anywhere else.
Usually caused due to another cat lurking outside/spraying around the walls/bullying them (if they go outdoors, or perhaps coming in through a cat flap), or some other reason why they feel the edges of their world are unsafe.
Shitting on the bed is them saying (actually not just saying, it is more severe than that) "we don't feel safe squatting outside of this core territory, and feel a deep need to mark this core area as ours"