The signal measured by an astronomical spectrometer may be due to radiation from a multi-component mixture of plasmas with a range of physical properties (e.g. temperature, Doppler velocity). Confusion between multiple components may be exacerbated if the spectrometer sensor is illuminated by overlapping spectra dispersed from different slits, with each slit being exposed to radiation from a different portion of an extended astrophysical object. We use a compressed sensing method to robustly retrieve the different components. This method can be adopted for a variety of spectrometer configurations, including single-slit, multi-slit (e.g., the proposed MUlti-slit Solar Explorer mission; MUSE) and slot spectrometers (which produce overlappograms).