Forty-one whales were swimming freely in shallow waters near shore as rescuers tried with little success to coax them out into deeper water. Wildlife officers euthanised four whales because they could not be saved, the National Oceanic and Atmospheric Administration (NOAA) said.
NOAA said via Twitter that survival rates were typically low in such instances.
The whales were first sighted on Tuesday afternoon in a remote part of the park near the Gulf of Mexico, park spokeswoman Linda Friar said.
They were believed to be short-finned pilot whales, typically found in deep water in tropical and temperate areas. Biologists will perform necropsies on the dead whales to try to determine why they were stranded, NOAA said.
"Pilot whales are common stranders. They tend to do this," Friar said. When rescued, she said, "they tend to rebeach themselves."
"This area of the park is probably the most challenging for something like this. When the tide goes out, there's hundreds of yards of very shallow shoals," Friar said.
Short-finned pilot whales typically travel in pods of 25 to 30 animals. Adults weigh 1,000 to 3,000 kilograms, with females averaging 3.7 metres long and males averaging 5.5 metres long, according to NOAA.