In an XMM-Newton observation of the binary SDSS J121209.31+013627.7, consisting of a white dwarf and an L dwarf, we detect X-ray orbital modulation as proof of accretion from the substellar companion onto the magnetic white dwarf. We constrain the system geometry (inclination as well as magnetic and pole-cap angle) through modelling of the X-ray light curve, and we derive a mass accretion rate of 3.2 10^(-14) M_sun/yr from the X-ray luminosity (~ 3 10^(29) erg/s). From X-ray studies of L dwarfs, a possible wind driven from a hypothesized corona on the substellar donor is orders of magnitude too weak to explain the observed accretion rate, while the radius of the L dwarf is comparable to its Roche lobe (0.1 R_sun), making Roche-lobe overflow the likely accretion mechanism in this system.