The 26-year-old man was the stronger swimmer and made landfall about 3.40am, raising the alarm a few minutes later.
His 40-year-old friend was sucked out to sea, but took the life-saving precaution of using the drawstring from his shorts to tie himself to an empty yellow petrol container.
The younger man, realising his friend had failed to reach the shore, raised the alarm using a holidaymaker's cellphone, and the Waihi Coastguard's boat Gallagher Rescue was launched.
Gallagher Rescue skipper Tim Watts said they were in the water at 4.20am and began searching the area where they thought the man would be.
It was a rough sea on a moonless night, and they could only see about 50m.
They searched until the skies lightened enough for the Westpac Rescue Helicopter to join the hunt.
The helicopter spotted the man still clinging to the yellow drum at 6.20am, not far from where the Coastguard was searching.
He was plucked from the water by the Coastguard, ending an ordeal that began more than seven hours earlier.
Mr Watts said the men were lucky to be alive, particularly the older man who spent another three hours in the open sea.
He put his survival down to the warmth of the water at this time of the year.
He said the older man was in a better condition than they anticipated and was very lucid.
They put a warm hat and socks on him and wrapped him in blankets until they reached St John paramedics on shore, who treated him for mild hypothermia.
The Coastguard then returned to retrieve the boat that had been located by the helicopter.
With the help of Whangamata Coastguard's boat GJ Gardiner Ranger, they righted the vessel and towed it back to its trailer at Anzac Bay.
Coastguard's Eastern Region operations manager Stuart Lowth said three mistakes contributed to the men putting their lives at risk.
He said boaties should not cross bars at night if they could possibly avoid it.
The men should have been wearing life jackets and should have filed a report with Coastguard detailing where they were going to fish and their estimated return time.
Mr Lowth said they should have at least radioed prior to crossing the bar so that if the Coastguard was unable to contact the boat within 15 or 20 minutes, they could begin an emergency response.
"They would have been in the water for a lot shorter time if we knew they were crossing the bar," he said.
Senior Sergeant Robbie Hermann of Hamilton police said the event could have easily ended in tragedy.
The Auckland Westpac Rescue Helicopter received a call about the missing fishermen from Waikato Search and Rescue at 5.30am.
Westpac Rescue 1 took off from Coromandel Rescue Helicopter Trust at Whitianga and was joined by Tauranga's Trustpower Tect rescue helicopter.
Safety tips for Bay boaties:
* Always have life jackets and preferably wear them, particularly when crossing bars.
* Skippers are responsible for the safety of those on board.
* Always have two forms of communication.
* Always get an up-to-date weather report and keep updating the report.
Source: Coastguard New Zealand