A few years ago this problem stopped for me though! I created these extra credit bathroom passes for my students and they are absolutely one of the best tools I have ever used for my classes! If you have an issue with students constantly wanting to use the bathroom, I promise this will solve the problem immediately!
I've done the distribution for these a few different ways at the beginning of the quarter. Some years and for some classes, I gave each student 3 or 4 depending on the period (those classes after lunch usually require more legitimate bathroom trips than in the morning).
Other years we played games the first week such as this one where students earn passes by naming as many people from the video as they can:
Either way, the passes good for either 5 or 10 extra credit points (both are provided) or one trip to the bathroom. When a student needs to use the restroom or get a drink, he or she turns in a pass. However many are left at the end of the semester, they get that much in extra credit!
When I implemented these several years ago, my students' "bathroom" trips dropped dramatically. The best thing is you never have to refuse anyone! It works like a charm and great for classroom management. Your students will be in the room and on task longer so that you can teach them more effectively. It's an incredible classroom management tool!
You'll find that those constant wanderers never leave the room! And if you have students who do use them up and are doing poorly in your class, think of the ammo you have for a parent conference! "Well, if only he hadn't gone to the bathroom so much, he could have 20 points extra credit."
You can find passes for 5 and 10 points here!
Thanks for looking!