In this article (https://oceanexplorer.noaa.gov/explorations/16carolina/logs/sep3-2/sep3-2.html) and articles like this one, Styrofoam cups were taken to the depths of the ocean in an AUV to demonstrate the extreme pressure of deep water. Once the Styrofoam is brought back up to normal atmospheric pressure, why doesn't the air rush in and the Styrofoam expand again?
3 Answers
The structure of styrofoam isn't as perfectly elastic as you think
Most styrofoam is created by various mechanisms that blow gases into the polystyrene matrix as it cools. One common process involves creating small beads saturated with pentane which are then expanded by treatment with steam (the pentane expands creating bubbles in the beads). The resulting beads can be extruded to create specific shapes (polystyrene is a thermoplastic). This process also creates many air-filled voids.
It might be thought that the closed cells would simply compress when subject to high external pressure and would then bounce back when the pressure is released. But this assumes two things: the cells are perfectly closed and the physical properties of the polystyrene matrix is perfectly elastic (like a rubber balloon). Neither are true. Polystyrene is not perfectly elastic and the cells are not perfectly closed. External pressure can easily be enough to damage the walls of the closed cells so they don't "bounce" back or they don't stay closed. And the overall structure is often easily penetrated by external stuff like water or gases other than the original pentane or air.
So external pressure will often alter the structure in many ways that mean it does not recover its original form.
For one,
Foams are materials formed by trapping pockets of gas in a liquid or solid.
(Wikipedia's definition of foam)
and styrofoam is a form of extruded polystyrene consisting of "95-98% air" which yields a "normal density range of $11$ to $\pu{32 kg/m^3}$" (for comparison: distilled water has a density of $\pu{1000 kg/m^3}$, the ocean's water, containing minerals exceeds this value). During the dive into the deep sea, the small cavities are irreversibly compressed by the high pressure while air escapes the material. As the pressure acts from all directions on the cups, the deformation isn't the same as e.g., accidentally stepping on one of the cups. The forces are much larger than a manual compression of the sponge next to the kitchen sink or/and the one in the bathroom.
Assuming the cups are indeed made from expanded polystyrene (styrofoam), it is useful to look at the glass transition temperature of polystyrene. Wikipedia claims it is around 100 °C. So below that, polystyrene is a glassy solid.
In fact, polystyrene at ambient conditions or at temperatures in the deep sea is a rather brittle material that cannot be deformed to high strains without failure. You might know it from the lab in the form of disposable petri dishes, or otherwise from CD cases. These also tend to be cracked easily. The same is true for expanded polystyrene. The inner structure of the material is basically irreversibly shattered at high pressure. It is analogous to a shattered glass, only that in that case the damage is more obvious, and you would not wonder why the original shape is not recovered after removing the force.