Changes in water level are commonly reported in regions struck by a seismic event. The sign and amplitude of such changes depend on the relative position of measuring points with respect to the hypocenter, and on the poroelastic properties of the rock. We apply a porous media flow model (TOUGH2) to describe groundwater flow and water-level changes associated with the first ML5.9 mainshock of the 2012 seismic sequence in Emilia (Italy). We represent the earthquake as an instantaneous pressure step, whose amplitude was inferred from the properties of the seismic source inverted from geodetic data. The results are consistent with the evolution recorded in both deep and shallow water wells in the area and suggest that our description of the seismic event is suitable to capture both timing and magnitude of water-level changes. We draw some conclusions about the influence of material heterogeneity on the pore pressure evolution, and we show that to reproduce the observed maximum amplitude it is necessary to take into account compaction in the shallow layer.