I emailed my local government to ask about whether it is allowed to walk on the trails at night because the signage at one of the places I like to go during the day says that the trails are only open from sunrise to sunset, and it is apparently a county wide rule.
Ymmv, but I night ride on my MTB and it depends on the park whether it’s being enforced or not. I regularly ride at a park way past dark and have several times seen the police drive right past me and not say a word. And the places where they do, I’ve only been told to leave without so much as a written warning.
I see those rules a way to guarantee probable cause when they suspect people are up to no good at a public park at night (and chances are, they’re right). It’s still a risk, but one I’m willing to accept.