Monitoring volatile organic compounds (VOCs) in indoor air is significantly gaining importance due to their adverse effects on human health. Among the diverse detection methods is optical sensing, which employs materials sensitive to the presence of gases in the environment. In this work, we investigate polydimethylsiloxane (PDMS), one of the materials utilized for gas sensing, in a novel transducer: a surface relief diffraction grating. Upon adsorption of the volatile analyte, the PDMS grating swells, and its refractive index changes; both effects lead to increased diffraction efficiency in the first diffraction order. Hence, the possibility of VOC detection emerges from the measurement of the optical power transmitted or diffracted by the grating. Here, we investigated responses of PDMS gratings with varying surface profile properties upon exposure to VOCs with different polarities, i.e., ethanol, n-butanol, toluene, chloroform, and m-xylene, and compared their response in the context of the Hansen theory of solubility. We also studied the response of the grating with a 530 nm deep surface profile to different concentrations of m-xylene, showing a sensitivity and limit of detection of 0.017 μW/ppm and 186 ppm, respectively. Structures in the PDMS were obtained as copies of sinusoidal surface gratings fabricated holographically in acrylamide photopolymer and revealed good sensing repeatability, reversibility, and a fast response time. The proposed sensing technique can be directly adopted as a simple method for VOC detection or can be further improved by implementing a functional coating to significantly enhance the sensitivity and selectivity of the device.