Soft gamma repeaters and anomalous X-ray pulsars are thought to be magnetars, neutron stars with strong magnetic fields of order $mathord{sim} 10^{13}$--$10^{15} , mathrm{gauss}$. These objects emit intermittent bursts of hard X-rays and soft gamma rays. Quasiperiodic oscillations in the X-ray tails of giant flares imply the existence of neutron star oscillation modes which could emit gravitational waves powered by the magnetars magnetic energy reservoir. We describe a method to search for transient gravitational-wave signals associated with magnetar bursts with durations of 10s to 1000s of seconds. The sensitivity of this method is estimated by adding simulated waveforms to data from the sixth science run of Laser Interferometer Gravitational-wave Observatory (LIGO). We find a search sensitivity in terms of the root sum square strain amplitude of $h_{mathrm{rss}} = 1.3 times 10^{-21} , mathrm{Hz}^{-1/2}$ for a half sine-Gaussian waveform with a central frequency $f_0 = 150 , mathrm{Hz}$ and a characteristic time $tau = 400 , mathrm{s}$. This corresponds to a gravitational wave energy of $E_{mathrm{GW}} = 4.3 times 10^{46} , mathrm{erg}$, the same order of magnitude as the 2004 giant flare which had an estimated electromagnetic energy of $E_{mathrm{EM}} = mathord{sim} 1.7 times 10^{46} (d/ 8.7 , mathrm{kpc})^2 , mathrm{erg}$, where $d$ is the distance to SGR 1806-20. We present an extrapolation of these results to Advanced LIGO, estimating a sensitivity to a gravitational wave energy of $E_{mathrm{GW}} = 3.2 times 10^{43} , mathrm{erg}$ for a magnetar at a distance of $1.6 , mathrm{kpc}$. These results suggest this search method can probe significantly below the energy budgets for magnetar burst emission mechanisms such as crust cracking and hydrodynamic deformation.