In the present study, we report on the swelling properties of poly(2–hydroxyethyl methacrylate) (PHEMA) and PHEMA/carbon black (CB) nanocomposite layers, used for volatile organic compounds (VOCs) detection. In particular, by means of a simple optical method based on thin film interferometry, the swelling, is studied and measured in ethanol vapors (max 1%). The method is very sensitive and the swelling in the range of only few nanometers is measured. Interestingly we find that the nanocomposite undergoes a more pronounced swelling process with respect to the pristine polymer. Ethanol diffusion coefficient in the nanocomposite was evaluated too.