Different types of foam (but probably not styrofoam) are used as a core material in composites for all types of craft, including 99% of surfboards. It's a tried-and-true technique. Even the pink construction-grade foam would be preferable to styro. Beware that the chemical composition of some resins will eat polystyrene foam. Polyester resins, the type found in automotive fiberglass kits will do that. Real epoxy resins (marine epoxy) are usually safe.