While you can often enter the public (landside) areas of an airport 24/7, you generally cannot pass through security and enter the terminal until 2 to 4 hours before your flight. Most airlines only open their check-in counters and baggage drops 3 hours before international departures and 2 hours before domestic ones. If you have a mobile boarding pass and only carry-on luggage, you might be able to enter earlier, but many TSA and security checkpoints will not let you through more than 4 to 6 hours before your scheduled takeoff to prevent gate overcrowding. If you have a very early morning flight and wish to sleep in the terminal, check the "Sleeping in Airports" guides for your specific hub, as some airports (like London Heathrow or Changi) have strict "no-loitering" rules for landside areas during the overnight hours unless you have a confirmed flight within a few hours.