I don't think the styrofoam causes poisoning as much as possible blockage. I worried myself sick when my chickens found a spot of sprayfoam used for sealing cracks, they pecked it cleaner than if I used a knife to clean it up. I especially worried about the bantums since they are so small. Well, they all lived.
I cannot saying yours are guaranteed to be fine, but remove the foam object, and watch them. Again, I don't think they can digest it, so the issue is if it blocks up their crop or gizzard or elsewhere in their digestive tract. I don't think the eggs would be effected. Anyone else want to chime in?