The existence of a shallow decay phase in the early x-ray afterglows of gamma-ray bursts is a common feature. We discuss the possibility that such a feature is connected to the formation of a highly magnetized millisecond pulsar, pumping energy into the fireball via magnetic dipole emission, while undergoing a secular bar-mode instability. If this is the case, gravitational wave losses associated with the neutron star's ellipsoidal deformation, would affect the star's spin-down, possibly producing a gravitational wave signal detectable by the advanced LIGO and Virgo. Such a signal, being emitted in association with an observed x-ray light-curve plateau over relatively long timescales, could open a new interesting opportunity for multi-messenger studies to be carried out in coincidence with gamma-ray burst sources. We conclude that the hypothesis proposed here deserves further investigation.