The swelling behaviour of β-cyclodextrin nanosponges, a new class of polymers obtained by reacting β-cyclodextrin with pyromellitic dianhydride, has been here investigated by the analysis of the vibrational dynamics performed by using Fourier-transform infrared spectroscopy in Attenuated Total Reflectance geometry and Raman scattering. The measurements have been carried out at different hydration levels and in the temperature range 250 K–310 K. The decomposition and assignment of the spectral components of the O–H stretching band have been discussed in terms of water molecules engaged in different hydrogen bonding networks, allowing us to recognize three different ‘types’ of water, namely ‘bonded’, ‘intermediate'and ‘free’. By following this approach, a detailed picture of the connectivity pattern of water molecules inside the polymeric matrix is achieved. The analysis of HOH bending vibrational band gives further information perfectly consistent with the results obtained from the analysis of the O–H stretching spectral region. Copyright © 2013 John Wiley & Sons, Ltd.