I cant give you the information about the motels but you can try googling them on-line. However, terminal 4 is the only terminal that is open 24/7 at JFK airport where you can get something to eat and relax overnight. You can get an air train on the third floor to get there in minutes from terminal 8 to terminal 4.
I cant give you the