Molecular dynamics simulation is applied to investigate the effect of two ionic liquids (IL) on the nucleation and growth of (nano-)cavities in water under tension and on the cavities’ collapse following the release of tension. Simulations of the same phenomena in two pure water samples of different sizes are carried out for comparison. The first IL, i.e., tetra-ethyl ammonium mesylate ([Tea][Ms]), is relatively hydrophilic and its addition to water at 25 wt% concentration decreases its tendency to nucleate cavities. Apart from quantitative details, cavity formation and collapse are similar to those taking place in water, and qualitatively follow the Rayleigh-Plesset (RP) equation. The second IL, i.e., tetrabutyl phosphonium 2,4-dimethylbenzene sulfonate ([P4444 ][DMBS]), is amphiphilic, and forms nanostructured solutions with water. At 25 wt% concentrations, [P4444 ][DMBS] favours the nucleation of bubbles, that tend to form at the interface between water-rich and IL-rich domains. Cavity collapse in [P4444 ][DMBS]/water solutions are greatly hindered by a shell of ions decorating the interface between the solution and the vapour phase. A similar effect is observed for the equilibration of a population of bubbles of different sizes. The drastic slowing down of bubbles’ relaxation processes suggests ways to produce long-lived nanometric cavities in the liquid phase that could be useful for nanotechnology and drug delivery.