If you look on your phone, you can see boarding passes that expired if you haven't already deleted them from your phone after a flight.
I always figured it would happen after the flight took off or a set amount of time afterwards.
The stroke of midnight for an 11:50pm flight that can easily be delayed a few minutes seems perilously Cinderella-like and would appear to be poor planning on IT's part