I did some testing on a couple types of foam (not specifically marine). The two that I tested were the pink foam available in sheets at home stores, and Great Stuff in an aerosol can. Both do not absorb water. I weighed samples then submerged them in water for about two days. Neither gained any water weight.
I also tested the pink foam for a reaction to the epoxy resin I am using and there was no reaction. I have not tested the Great Stuff with the epoxy.
I also weighed an equal volume of each to see if there was any significant difference in density, which would affect the flotation lift from a given volume. They were essentially equal in that area also. I am using epoxy resin to bond the foam in place so that adds a little weight and decreases the pink flotation factor slightly.
My boat is fiberglass, not aluminum and I used the pink foam under my foredeck. The new structure I created for the foredeck makes it very strong and will keep the surface finish from cracking. I will probably also use it under the floor, bonded in place so there are no voids into which water can accumulate. If there are any small spaces that are hard to fill with the pink foam, I may shoot some Great Stuff in there. Since I will be filling the cavity completely, I do not plan to have any bilge drains. I expect the fully filled cavity to add considerably to the strength of the hull.