I would think that the treatments on the denim would off-gas, too....
You could seal the foam by painting each piece with latex paint. Let the paint dry before you install it. That might help. You don't have to get expensive paint. You can buy the "goofs"and discontinued paint pretty reasonably.
I am using 2" Styrofoam sheets as a sound barrier, outside, in between our fences by the neighbor's noisy pool. I painted the all sides of the foam with shadow grey latex paint 3 years ago, so that it wouldn't be noticeable between the boards. It's holding up great. (The peace is great, too.)