The back removable wall of Exo Terra reptile tanks are made of styrofoam so I'm guess it's ok. Of course you don't want your reptile eating styrofoam packaging peanuts either so it's a toss up. Why do you ask?
I posted two threads because I got the idea from the second and it all really started at blackjungle.com but thats another story.
with these methods you dont necessarily need to coat the finished foam its already colored throughout it is inert and it vivarium, terrarium and aquarium safe.