The result put Cuba atop Group 8, two points better than host Trinidad & Tobago and St. Vincent & the Grenadines, which drew 1-1 in the nightcap of a doubleheader. The top two teams from Group 8 will advance to the Caribbean Cup finals.
Hernandez gave Cuba the lead in the sixth minute, and added goals in the 36th, 62nd and 89th minutes to end Cuba's 13-match winless streak. Cuba had not won since a 2-1 friendly victory over Nicaragua in May 2011.
It also was the first time Cuba had scored two goals or more in a match since the Nicaragua victory and the first time it had scored four in a match in over two years.
Ariel Gonzalez also scored for Cuba in the 46th.
In the other match, Devon Jorsling and Myron Samuel traded first-half goals to lead Trinidad and St. Vincent deadlocked. It was the first draw in 12 meetings in the Caribbean rivalry, which Trinidad has dominated with eight victories in the series.
Jorsling put Trinidad ahead in the third minute before Samuel equalized in the 24th.
Samuel's goal was only the second allowed by Trinidad in its last four matches.
St. Vincent next plays Cuba on Friday before Trinidad faces Suriname.