We get this question from time to time about increasing the flotation by filling with foam...
Hobie masts are only capped (sealed) with foam. Foam has a weight of about 2 lb per sq foot (depending on the foam), so filling a mast or hulls would add weight by displacing the air. Foam also absorbs or can trap moisture further adding weight.
Filling a fixed volume object with foam does not make it float better. The object (when sealed properly) has a flotation based on its volume (displacement) and weight combined. When the volume is filled with air, that is the most flotation you will get. You can only increase the flotation by increasing the volume / displacement (larger sealed space).
The next critical aspect is the location of that flotation volume. The further up the mast, the sooner the flotation volume is engaged when capsized. The Hobie floats are the best scenario. They position the flotation at the tip of the mast. They offer very little windage (smaller than a single human head, but more aerodynamic) and do not disturb the airflow over the sail or the sail shape.
Adding foam to the sail causes windage and sail shape issues diminishing the sails performance. Same with foam around the mast top. Both of these ideas also allow the boat to go much further over before that flotation is engaged.
Any floatation added to the mast top will also be added weight, so expect righting to require some additional weight / effort.