Here's what my SOP would be if I were a local..... go into the garage shortly before closing, say about a half hour prior to closing.. Stay in the car, do my charge and then leave after the toll booth closes. It's like a safety thing that you can get OUT of a garage after hours.
I think many parking garages have a "lost ticket" or "overnight" rate that it might ask you to pay instead. As far as safety goes, you might be able to leave, but the car might not be able. In some cases there's a way to call someone to come let you out. I imagine there's a fee involved there as well.
I wish. My first real date, I took a girl to the movies and got locked in the garage. Thankfully someone else had a 24/7 pass and let me tailgate them out.