I know two guys who have built their own boats here at the club, one out of aluminium the other made of steel, both Van de Stadt 30+ footers and both of them insulated their hulls using a blue type of closed cell foam (extruded
polystyrene) that they cut to fit from commercially available blanks normally sold for residential wall/ceiling/roof insulation purposes. Expanded
polystyrene is normally used as surfboard blanks.
It was an entedious task (because this foam comes in blanks from which they had to cut as needed) but they made it with very good results in terms of sound/thermal insulation properties.
The bad thing about the polyurethane (PU) foam you mention, which is the type of expandable foam normally available at DIY stores in aerosol cans, is that it is of the open cell type and although it shows excelent insulating properties it also does soak water and should, in my opinion, be avoided for marine use applications.
is the stuff they used