Them not allowing you to use a restroom - would that hold up in court?
I don't know what the laws are about this sort of thing. It's really not that you're not allowed to use a restroom, it's that there aren't necessarily any available where you are when you have to go.
If I ever have to explain a gap about using the bathroom then all I can do is say I had to go. If they give me any trouble beyond that about it all I can do is ask them to give me something in writing detailing how long and under what circumstances I am and am not allowed to use the bathroom.