your foam is open cell right? Try some hobby grade foam safe CA (superglue). some sort of silicon adhesive will be very gentle on the foam and case and form a flexible bond. However, the dry time is killer.
Cattle die, kinsmen die
all men are mortal.
Words of praise, will never perish
nor a noble name.
- The Havamal