Hydrophobic nanoporous materials immersed in water are emerging as promising means to store or dissipate energy [1][2][3]. In such applications, surface energy is accumulated when the water pressure is increased causing liquid intrusion inside the pores and can be subsequently released by decreasing pressure and triggering cavitation inside the pores. Given the extreme confinement, which for zeolites and metal organic frameworks can be below the nanometer, the phenomena of liquid intrusion and cavitation are expected to significantly deviate from the classical macroscopic laws: cavitation can happen at pressures larger than tens of MPa.In this contribution, we study via molecular dynamics the nucleation of a vapor cavity inside nanometer-sized hydrophobic pores and the opposite process of liquid intrusion. By employing advanced rare-event simulation techniques in order to tackle the long timescales typical of vapor nucleation, we obtain molecular-level insights into nanoconfined cavitation (and liquid intrusion) avoiding simulation artifacts [4]. The simulation campaign reveals deviations from the macroscopic Kelvin-Laplace law for liquid intrusion in a capillary and a significant increase of the cavitation rate as compared to the predictions of the classical nucleation theory. Furthermore, the behavior of nanoporous materials as molecular springs or as vibration dampers is critically discussed and related to their physical characteristics.