I would assume they use the same technique they use when he and Meryl have sex, they cut away briefly.
Flat-top Guard: You never see anything, anyway. They always turn the camera, and play music, and... you know, the wind blows in and the curtains move, and you don't see anything.
Obviously the crew would have seen everything, because they'd need to know when to cut back.
In an earlier version of the script, Christof claims to have no cameras in the toilet.
MALE CALLER 2 (O.S.): Christof? Congratulations on the way you've always handled Truman's "sex" life - the classical music, soft lighting and so on. But has the recent violence caused a problem for the show's sponsors?
CHRISTOF: The sponsors know the risks going in, although we do try to maintain standards - a level of decorum. For instance, I've never put a camera in the toilet.
You might want to note that in the same version of the script, the staff are observing, recording and discussing Truman's masturbatory habits.
CHRISTOF (smiling to himself): God, that thing of his must be psychic. (matter-of-fact) He didn't masturbate?
CHLOE: Not for the last two months.