I always used to find out the county or city rules beforehand. Often Parks and Rec schedule courts for their programs and HS teams have practice hours that are regular. Outside of those, usually we never had to ask permission from a HS coach.
At a College where I was Coach and Instructor I only used my priority on court usage when we had classes or practice.
It's always best to know your legal position and rights, and it helps to know someone at the county Park and Rec. From my experience, the more rural your location the fewer restrictions you'll have to consider.