  Atmospheric Cherenkov telescopes rely on the Earth's atmosphere as part of
the detector. The presence of clouds affects observations and can introduce
biases if not corrected for. Correction methods typically require an
atmospheric profile, that can be measured with external atmospheric monitoring
devices. We present a novel method for measuring the atmospheric profile using
the data from Imaging Atmospheric Cherenkov telescopes directly. The method
exploits the comparison of average longitudinal distributions of the registered
Cherenkov light between clear atmosphere and cloud presence cases. Using Monte
Carlo simulations of a subarray of four Large-Sized Telescopes of the upcoming
Cherenkov Telescope Array Observatory and a simple cloud model we evaluate the
accuracy of the method in determining the basic cloud parameters. We find that
the method can reconstruct the transmission of typical clouds with an absolute
accuracy of a few per cent. For low-zenith observations, the height of the
cloud centre can be reconstructed with a typical accuracy of a few hundred
metres, while the geometrical thickness can be accurately reconstructed only if
it is >= 3 km. We also evaluate the robustness of the method against the
typical systematic uncertainties affecting atmospheric Cherenkov telescopes.
