  We study variability through simultaneous optical and X-ray observations for
the first time in a statistical sample of 256 M dwarfs. Such observations are
required to constrain the flare frequency and energetics and to understand the
physics of flares. Using light curves from 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), we identify
256 M dwarfs with simultaneous detections. The 25 brightest or most variable in
X-rays are selected. Stellar parameters are obtained from Gaia and 2MASS, while
X-ray fluxes are derived from eROSITA count rates. Proximity (<100 pc), fast
rotation (P_rot < 9 d), and high flare frequency characterize our sample.
Optical and X-ray duty cycles correlate positively, with faster rotators
exhibiting more variability. Stars with frequent X-ray flares often coincide
with optical flares. Analyzing individual X-ray flares is hindered by eROSITA's
low cadence, mitigated by leveraging TESS optical flares and solar flare
knowledge. An exponential fit to 21 X-ray light curves post-optical flares
reveals a correlation between X-ray and optical flare energies. Despite
uncertainties due to poor eROSITA sampling, our study underscores the
significance of simultaneous all-sky surveys in diverse wavelengths for
unprecedented insights into stellar variability.
