We experimentally study the stability of a bosonic Mott insulator against the formation of a density wave induced by long-range interactions and characterize the intrinsic dynamics between these two states. The Mott insulator is created in a quantum degenerate gas of 87-Rubidium atoms, trapped in a 3D optical lattice. The gas is located inside and globally coupled to an optical cavity. This causes interactions of global range, mediated by photons dispersively scattered between a transverse lattice and the cavity. The scattering comes with an atomic density modulation, which is measured by the photon flux leaking from the cavity. We initialize the system in a Mott-insulating state and then rapidly increase the global coupling strength. We observe that the system falls into either of two distinct final states. One is characterized by a low photon flux, signaling a Mott insulator, and the other is characterized by a high photon flux, which we associate with a density wave. Ramping the global coupling slowly, we observe a hysteresis loop between the two states-a further signature of metastability. A comparison with a theoretical model confirms that the metastability originates in the competition between short- and global-range interactions. From the increasing photon flux monitored during the switching process, we find that several thousand atoms tunnel to a neighboring site on the timescale of the single-particle dynamics. We argue that a density modulation, initially forming in the compressible surface of the trapped gas, triggers an avalanche tunneling process in the Mott-insulating region.