Salty,
I don't have any actual experience so I'm sort of thinking out loud here. The spray in foam that I have seen aged seems to have deteriorate with age, so not the highest quality foam. If you do spray in foam and it goes bad you'd have a heck of a time removing it, I would think. Aluminum masts get pretty dang hot out in the sun and I would suspect that spray in foam would deteriorate and lose its adhesion to the aluminum fairly quickly. If you were to ever get water in your mast it would likely be impossible to get it all out, especially if the foam was not 100% adhered to the aluminum, which is unlikely. This would be particularly bad if it were saltwater. Myself, I would not do it.
The Allspar mast that I have has plugs that are made of two lightweight aluminum plates with foam between them and a screw that goes through the middle to squeeze the foam tight into the mast. I have to believe that they were original. It seems to me it would be easy enough to use some high-quality closed cell foam and cut a gasket/bulkhead and install it with a little bit of sealant to make plugs. There's nothing lighter than air, unless you are going to use helium. Anything else is going to be heavier and sink more than a well sealed mast. It should be easy enough to find and seal any other possible leaks on the mast.
How much would it help to have foam flotation in your mast in case you did have a leak? I'm's skeptical as to how much it would help. If you have a couple of feet of foam and the rest of the mast fills with water, it's going down. And, 99.999% of the time you would be paying the price for extra weight aloft.
As I said, I have no practical experience, just the way I view it.
You don't have to reinvent hiking shorts with pads, they already exist.
