Don't know if the terminal actually locks up, but LGA does shut down to air traffic from after midnight until 5:30-6AM-ish - if your late flight happens to be late you get diverted; when my ORD-LGA flight was terribly late and on track to arrive around 1AM, it diverted to JFK.