Thermal energy is stored within mass, either in a heat sink of rubble or gravel, or by installation of thermal batteries, like dark barrels of water. Dense materials like water and concrete have a high capacity to store heat and are referred to as 'high thermal mass' materials. 'Thermal mass' describes a material's capacity to absorb, store and release heat.
Thermal energy can be stored within a greenhouse within batteries, a heatsink, or within the materials of the greenhouse itself. During the warm day, dark colored and highly absorbant materials soak up the sunlight's heat, before releasing it once the night comes, and the temperature drops.