Whereas the nature of dark components in the Universe remains unknown, alternative models of gravity have been developed to offer a geometric explanation to the origin of such components. In this work we use the Minimal Geometric Deformation approach to study extensions of the theory of General Relativity in a cosmological context. This is possible since such approach allows the decoupling of gravitational sources, and the Einstein field equations can be analytically solved with the presence of a new gravitational sector once a known GR solution is considered. In particular, we implement such approach in Friedmann–Robertson–Walker and Kantowski–Sachs universes. We demonstrate that the gravitational decoupling leads to modifications of well known cosmological solutions. For instance, we show that an effective spatial curvature in the Friedmann–Robertson–Walker metric, as well as several kind of matter components in the Kantowski–Sachs case, are obtained. Thus, we found that it is possible to obtain spatial curvature and new matter terms from geometry, which in cosmology they could be useful in addressing problems such as the spatial flatness of the Universe, dark matter and dark energy.