Spray foam in a frame would be a terrible idea, and would come back to bite quickly. Almost all over-the-counter spray foams are open cell foams that soak up water like a sponge (may not be obvious at first, but they will take in water), and after they do, they will not release that water easily. Which would mean that water would get quickly and perpetually trapped in the frame, along with salt and other goodies. The frame would rot out much quicker. I hope nobody does this. On the kayaking forums, people always come up with ideas for using spray foam in their boats, and then learn the hard way that it doesn't work around water, and it is a major pain to remove once they realize that.