Gravitational waves (GWs) can offer a novel window into the structure and dynamics of neutron stars. Here we present the first search for long-duration quasi-monochromatic GW transients triggered by pulsar glitches. We focus on two glitches observed in radio timing of the Vela pulsar (PSR J0835-4510) on 12 December 2016 and the Crab pulsar (PSR J0534+2200) on 27 March 2017, during the Advanced LIGO second observing run (O2). We assume the GW frequency lies within a narrow band around twice the spin frequency as known from radio observatons. Using the fully-coherent transient-enabled F-statistic method to search for transients of up to four months in length. We find no credible GW candidates for either target, and through simulated signal injections we set 90% upper limits on (constant) GW strain as a function of transient duration. For the larger Vela glitch, we come close to beating an indirect upper limit for when the total energy liberated in the glitch would be emitted as GWs, thus demonstrating that similar post-glitch searches at improved detector sensitivity can soon yield physical constraints on glitch models.