In many circumstances, employers may prevent employees from using the bathroom. California employers must provide a sufficient number of toilet facilities within reasonable access to the employees. But there is no black and white law that provides employees the right to use the restroom whenever employees see fit.
For example, employers might limit employees’ use of bathrooms to lunch breaks and rest breaks, also known as meal and rest periods, to prevent productivity loss. However, if an employer has an employee with a disability or medical condition that requires frequent and flexible bathroom use as a reasonable accommodation, then that employer could not lawfully prevent that employee from using the restroom.
(See Link: Government Code Section 12940; Labor Code Section 2350)