Hi Chris,
If you can cut the foam as a nice firm fit i don't think you'll need any glue at all!
If you have to use glue, ordinary pva glue should surfice as Leon said but it's not flexible and might not bond to some foam.
I've used gel contact glue on heaps of other projects but I couldn't find out anything about the out gassing online and takes a few days for the smell to dissipate as well. My case from cases.com.au looks like they've used a type of contact glue around the edges so I let it air out about a week before placing any eyepieces in it.
All good