Early morning departures used to be a bit iffy during the peak of the cruise season if there were several loads of ships that had disgorged pax the night before. That's probably less of a factor now given the drop in cruise traffic. The bottlenecks are not just customs/immigration but going through security as well.
Bear in mind U.S. CBP/ICE doesn't open until 5am. If you can fill out U.S. entry forms, don't have checked bags/print your own BP in advance, it'd save you a lineup at the checkin counters.
I'd say 5, or slightly earlier, would be a good time to get to the airport depending on the previous paragraph.