I have masturbated in many restrooms. I'm in the UK so we call them toilets. We had boys toilets at my high school and I would sneak off at break and try to masturbate in the time I had, usually unsuccessfully given the five minutes we had. And also taking up one of the three toilets to jerk off would result in other boys lobbing wet tissue over the doors so it rarely happened at school.
I worked in supermarkets and offices while at University and found it much quieter and easier to spend my lunch hour beating myself off thinking about the girls I worked with. I remember the toilets being much more closed and sealed around the corners as to not allow others to see what i was doing.
By far the best public toilets to jerk off in are at airports. I have travel to the US a number of times each year and I enjoy the privacy and the sealed nature of the toilets at airports. I like to completely strip off my trousers and underwear, and spend a good 20 minutes wanking before getting on my flight,
On a side note, my wife likes masturbating on the actual flight. Its a slow progressive affair, I think. Under a blanket, lights low, mid flight, most people are asleep. She tells me “I think I'll put this blanket over me for a bit”. We smile knowingly and she has her fun. I think it's a little easier for women. She doesnt wear underwear for such flights, and for those opportunities.
After discussing this with my wife, she told me of times when she would go swimming as a teenager. After her swim she would find a single cubicle to change in as the changing area was unisex. So if you wanted privacy, cubicles were all around the edge. Although ‘private' there was a small gap about 2 feet above the tiled floor, where the brick tiled seating met the wooden dividers of each cubicle. Regularly she would watch men masturbating in the cubicles next to her through this small space. They either liked being watched by girls or were completely oblivious to the gap.