IIRC, OP likes these airport overnight stays, so here goes:
EWR is probably even worse than PVG for an overnighter.
As someone else suggested, the baggage claim area is probably your best bet.
I was there in some terribly early morning hours once, and there quite a few homeless people taking advantage of the heated interior of the C terminal baggage claim area (it was mid-winter).
Not sure there's even vending machines there, so make sure you can somehow stock up on drinks and food beforehand.