According to several sources: Yes they do.
It's incredibly difficult to find any detail on this as it's an understandably delicate subject at best. Races are a few hours long, so it's not inconceivable that a driver can resist the urge to pee for the duration, but you'd imagine that at least one driver has needed to go during a race.
Nick Heidfeld shed some light on it in an interview with German newspaper Bild when asked what he does when he needs to go to the toilet:
"What should I do? Head for the pits and ask for a bathroom break?"I can't find the original German article, but here's one in Italian:
"You know what? The liquid evaporates pretty quickly!"Yep, they just piss themselves.
An Indian TV station asked Narain Karthikeyan about it and he had this to say (skip to 1:45 for that bit):
Just yesterday, the always excellent Craig Scarborough wrote an article for Gizmodo dealing with the subject. According to him, there's at least one current driver who happily pees in the car:
Surprisingly, no one wants to be quoted on saying driver “X” does this habitually. I can only assure you there is one driver currently in the grid who is well known for doing this and he is not alone. I’ve heard this from different mechanic\technicians.
The joke is a young mechanic is asked to check the ‘unexplained’ fluid leak on the grid, with ‘taste’ being the best of our sense to identify the nature of the fluid! yuk
Head on over to Gizmodo to read his full take on the situation