We examine the hydromagnetic stability of magnetically confined mountains, which arise when material accumulates at the magnetic poles of an accreting neutron star. We extend a previous axisymmetric stability analysis by performing three-dimensional simulations using the ideal-magnetohydrodynamic (ideal-MHD) code zeus-mp, investigating the role played by boundary conditions, accreted mass, stellar curvature and (briefly) toroidal magnetic field strength. We find that axisymmetric equilibria are susceptible to the undular submode of the Parker instability but are not disrupted. The line-tying boundary condition at the stellar surface is crucial in stabilizing the mountain. The non-linear three-dimensional saturation state of the instability is characterized by a small degree of non-axisymmetry (≲0.1 per cent) and a mass ellipticity of ε∼ 10−5 for an accreted mass of Ma= 10−5 M⊙. Hence, there is a good prospect of detecting gravitational waves from accreting millisecond pulsars with long-baseline interferometers such as Advanced Laser Interferometer Gravitational-Wave Observatory. We also investigate the ideal-MHD spectrum of the system, finding that long-wavelength poloidal modes are suppressed in favour of toroidal modes in the non-axisymmetric saturation state.