At that hour you could still take public transportation which is cheapest; Airtrain from terminal to Jamaica Station and either LIRR or E subway to Penn Station, then NJ Transit train from there to Newark Airport station where there is AirTrain service from station to terminals. Airtrain $5, subway $2.25 (LIRR $5.75), NJ Transit $12.50 includes the EWR Airtrain fee.
At that hour you could still