Some of them hotels in the JFk area are big dumps. If you need to stay in one, I would recommend reading reviews on Trip advisor very carefully.
We once had a very early flight (6am but international, so get there by 4) out of JFK, so we spent the night before in a hotel which included a week of parking w the night. (We would otherwise allow 1.5-2 hours travel timE) It was not too much more than a week of parking near the airport and we got some sleep that night.