I agree that you probably don't want to use a solid foam for insulation. There will be voids in back of it, and moisture can collect there. If you glass over styrofoam , then you will have to use epoxy. PVC, and urethane foams can be compatible with polyester resins.
We insulated a 38 foot sailboat--and a friend in the high end business gave us 5/8" neoprene (like wet suit material)--that would have cost thousands to buy--we put it in with a contact cement, and covered the inner surface (toward the boat) with the material used on the walls of aircraft (surplus from McDonald Douglas). The second boat was the Cal 46. We used "Fish Blanket" which is a foam used between layers of fish and ice in the holds of fishing boats. Many hardware and fishing supply stores in AK had this in stock. We applied it to the side of the hull with "liquid nails" and the inner was covered with an upholstery fabric held with 3M contact cement for cloth in some parts and with teak battens in other places.
I have some backpacking pads I got a WalMart, which seem to be a similar material, and am planing to use that on the C Dory. Again, I will finish the interior with cloth and contact cement. We used these just laid in place on the inner side of the hull on the V berth, last summer in the PNW and they seemed to work well.