Both caves used to be above the water's surface until rising oceans submerged them.
Sigh. This is a misleading statement, as it suggests that the caves formed with air in them. That is not true. This a common misunderstanding of many caves, but I see this type of statement allot in relation to the Yucatan caves.
The caves formed underwater, acting like underground rivers. However in the past, sea levels have been lower than they are currently because of all the water frozen at the poles and in glaciers. During one of those past glacial periods, sea level was lower and many of these coastal caves ended up being drained, and speleothems formed in them.
We are currently at a relatively high sea level, and so these older caves with the speleothems have been reflooded. Some parts of the cave are actively being eroded out again making even more underground rivers. However the parts of the cave with all the speleothem decorations are older than at least 1 glacial cycle, and possibly many more. I would suggest that some parts of the caves are at least 2-3 glacial cycles old but this remains to be quantified using U/Th dating. This cycle of formation-draining-reflooding is why the Yucatan caves are called polygenetic, they have had more than 1 formation cycle overprinted on top of what was there before. It makes studying the geomorphology and hydrology a very fun topic, and very distinct from the situation in continental caves.
One of the reasons that the caves along the Caribbean coast of the Yucatan have experienced so many flooded-drained-flooded cycles is that the peninsula appears to be fairly stable in its vertical position relative to sea level. The Yucatan peninsula has not been uplifted like the islands of Guam, Isla de Mona, and others have been. When a karst coastline is uplifted, the caves are literally lifted up and out of the water by geological processes leaving the caves perched up on the escarpment faces. Those perched caves will never be subjected to the reflooding that the Yucatan caves are.
It is also worth mentioning that the cenote sinkholes of the Yucatan - especially on the Caribbean side - are a feature directly related to this formation-draining-reflooding cycle. Most cenotes are just sections of the cave where the roof has collapsed. This happens easily enough when the sea level drops, as the buoyant support of the water is lost and the ceiling just can't support itself in air. When the sea level rises again, the collapse is filled with water making a pretty water filled cenote.
Sorry - I didn't mean to write so much. I know that the original posting was just pointing to a press release. Hope you enjoyed some of this.