It is the case with polystyrene, but may not be with polyurethane.
When the first 'diy' versions of polyurethane foam came out, some carried warnings about plasticiser leeching. These days they don't seem to - so maybe PU foam doesn't/never did? Don't know. But enough doubt for me not to risk it on mains cables.