Stochastic processes are highly relevant in research fields as different as neuroscience, economy, ecology, chemistry, and fundamental physics. However, due to their intrinsic unpredictability, stochastic mechanisms are very challenging for any kind of investigations and practical applications. Here we report the deliberate use of stochastic X-ray pulses in two-dimensional spectroscopy to the simultaneous mapping of unoccupied and occupied electronic states of atoms in a regime where the opacity and transparency properties of matter are subject to the incident intensity and photon energy. A readily transferable matrix formalism is presented to extract the electronic states from a dataset measured with the monitored input from a stochastic excitation source. The presented formalism enables investigations of the response of the electronic structure to irradiation with intense X-ray pulses while the time structure of the incident pulses is preserved.