At JFK T8 you are not supposed to stay airside all night. Private security contractors (not TSA) patrol the concourses and will ask you to leave the secured area if they find you. The checkpoint re-opens around 4:30am, and the lounges open at 5:15am.
Landside at T8 is not very pleasant, though there are some benches and an occasional cot sitting in a corner, left over from the last big IRROPS evening.
For anyone who is staying overnight at JFK and wants to remain at the airport, I recommend heading over to T4, the international terminal. There is a big shopping arcade outside security with a number of 24-hour vendors.
Alternatively, take the AirTrain to Jamaica to the E subway and enjoy Manhattan for a few hours! (I feel VERY safe walking around Midtown/Times Sq late at night)