Most directly imaged giant exoplanets are fainter than brown dwarfs with similar spectra. To explain their relative underluminosity unusually cloudy atmospheres have been proposed. However, with multiple parameters varying between any two objects, it remained difficult to observationally test this idea. We present a new method, sensitive time-resolved Hubble Space Telescope near-infrared spectroscopy, to study two rotating L/T transition brown dwarfs (2M2139 and SIMP0136). The observations provide spatially and spectrally resolved mapping of the cloud decks of the brown dwarfs. The data allow the study of cloud structure variations while other parameters are unchanged. We find that both brown dwarfs display variations of identical nature: J- and H-band brightness variations with minimal color and spectral changes. Our light curve models show that even the simplest surface brightness distributions require at least three elliptical spots. We show that for each source the spectral changes can be reproduced with a linear combination of only two different spectra, i.e. the entire surface is covered by two distinct types of regions. Modeling the color changes and spectral variations together reveal patchy cloud covers consisting of a spatially heterogenous mix of low-brightness, low-temperature thick clouds and brighter, thin and warm clouds. We show that the same thick cloud patches seen in our varying brown dwarf targets, if extended to the entire photosphere, predict near-infrared colors/magnitudes matching the range occupied by the directly imaged exoplanets that are cooler and less luminous than brown dwarfs with similar spectral types. This supports the models in which thick clouds are responsible for the near infrared properties of these underluminous exoplanets.