The standard cosmological model features two periods of accelerated expansion: an inflationary epoch at early times, and a dark energy dominated epoch at late times. These periods of accelerated expansion can lead to surprisingly strong constraints on models with extra dimensions. I will describe new mathematical results which enable one to reconstruct features of a higher-dimensional theory based on the behaviour of the accelerating four-dimensional cosmology. When applied to inflation, these results pose several interesting questions for the construction of concrete models. When applied to dark energy, they provide a new technique to combine measurements of dark energy parameters and constraints on variation of Newton's constant. This technique can transform near-future dark energy surveys into become powerful probes of extra dimensional physics.