You cannot "spend the night" in Penn Station New York in the sense of using it as a hotel, and attempting to sleep there will likely result in a wake-up call from the NYPD or Amtrak Police. While the Long Island Rail Road (LIRR) concourse is technically open 24 hours, the new Moynihan Train Hall (where Amtrak and most high-end seating are located) closes daily between 1:00 AM and 5:00 AM. During these overnight hours, security is very strict; you generally must have a valid ticket for a departing train within a few hours to be allowed to stay in the waiting areas. There are no "lie-flat" benches, as most seating is designed with armrests to prevent people from reclining. If you have a long layover, it is significantly safer and more comfortable to book a "micro-hotel" like Yotel nearby or a "Minute Suite" if you are at an airport. Staying in Penn Station overnight is generally discouraged due to safety concerns and the lack of proper rest facilities.