I'm not sure if this is airline or airport-specific? (assuming airport)
I know that if I have an early morning flight and show up the night before, I'm denied because the date on my ticket is for the next day. However, I just took a flight from Lima to Easter Island that left at 1:20 AM, and while I was denied through security at 11AM (yeah, I tried, I was already at the airport) I was allowed to enter around 4 PM, just over 8 hours prior to the flight. (Security was fine, but Immigration balked at my earliness, and eventually let me through when they got tired of waiting from an answer from above.)
I've had 12 hour layovers like this before, but only on international connections through an airport.
I'm interested in the general answer to the question, but I do have a localized situation that has prompted it:
I have an upcoming 9:45AM flight (international) into Santiago, Chile, and my connection (domestic) will get me to the airport around 9PM the night before. I'd prefer to stay at the airport and sleep, but it would be much nicer airside, especially if I get into a lounge. Do I have a chance of waiting until 1AM or so (so the date matches my boarding pass) and being allowed through security?