M-dwarf stars are the most numerous stars in the Galaxy, and are highly magnetically active. They exhibit bursts of radiation and matter, called flares and coronal mass ejections which have the potential to strongly affect the habitability of their planets. We investigate variability through simultaneous optical and X-ray observations, forming the largest statistical sample of M dwarfs observed in this way so far. Such simultaneous observations at different wavelengths, which correspond to emissions from different layers of the stellar atmosphere, are required to constrain the flare frequency and energetics and to understand the physics of flares. We used light curves from the extended ROentgen Survey with an Imaging Telescope Array (eROSITA) on board the Russian Spektrum-Roentgen-Gamma mission (SRG) and the Transiting Exoplanet Survey Satellite (TESS) for a sample of M dwarfs observed simultaneously with both instruments. Specifically, we identified 256 M dwarfs in the TESS Southern Continuous Viewing Zone (SCVZ), which corresponds to a sky area of 452.39 ($ deg^2 $), with simultaneous TESS and eROSITA detection. For this work, we selected the $25$ X-ray brightest or most X-ray variable stars. We used photometric data from Gaia and 2MASS to obtain stellar parameters such as distances, colours, masses, radii, and bolometric luminosities. X-ray fluxes and luminosities were determined from observed eROSITA count rates using appropriate rate-to-flux conversion factors. We defined and examined various variability diagnostics in both wavebands and how these parameters are related to each other. Our stars are nearby (mostly within $ 100$\,pc ), rotating fast rot < 9$\,d), and display a high optical flare frequency, as expected from the selection of particularly X-ray-active objects. The optical duty cycle -- defined as the fraction of observing time in which the stars were in a high activity state -- is well correlated with the optical flare rate and was therefore used as proxy for optical variability. The X-ray and optical duty cycles are positively correlated, and there is a trend of faster rotators tending to have higher X-ray and optical variability. For stars with many X-ray flaring events, the chances of these events being found together with optical flares are high. A quantitative variability study of individual flares in the X-ray light curves is severely affected by data gaps due to the low (4\,h) cadence during the eROSITA all-sky survey. To mitigate this, we made use of the optical flares observed with TESS combined with knowledge accumulated from solar flares to put additional constraints on the peak flux and timing of X-ray events. With this method we could perform an exponential fit to X-ray light curves in the aftermath of an optical flare, and we find that the energies for these X-ray flares are well correlated with the corresponding optical flare energy. We also found two peculiar flaring events with uncharacteristically long duration and high energies observed in both their X-ray and optical light curves. Despite the substantial uncertainties associated with our analysis, which are mostly related to the poor sampling of the eROSITA light curves, our results showcase in an exemplary way the relevance of simultaneous all-sky surveys in different wavebands for obtaining unprecedented quantitative information on stellar variability.