There is a park near me in Montreal that is legally closed at 10PM. One night my wife and I went there to see a passage of the space station that was around 10:15. Since the lights went out at 10 in the attached tennis courts, it was the darkest sky around and also had a small hillock which gave better viewing. Five minutes later, the cops arrived and shooed us off. When I explained why we were there, he told us to go watch somewhere else. Of course, there was no somewhere else. I suspect the real reason for the ban is to stop kids from screwing.
When I lived in Zurich for a year, there was a park near us that had a ban from something like 11PM to 6AM. As it happened I was often waking at 4 and, after breakfast, I would walk to my office through this small park maybe at 5:30. No one ever told me to stop. This park seemed to be part of a churchyard and might have been private.
To hijack this a bit, there is a train running through my town. There is a car bridge and two footbridges, each about a half mile from the car bridge. One of the two footbridges is locked every night between 10PM and 6AM, for no discernible reason. The gates and locks were added only about five years ago.