The vertical structure of temperature observed by SABER (Sounding of Atmosphere using Broadband Emission Radiometry) aboard TIMED (Thermosphere, Ionosphere, Mesosphere Energetics and Dynamics) and sprites observations made during the Eurosprite 2003 to 2007 observational campaign were analyzed. Sprite observations were made at two locations in France, namely Puy de Dome in the French Massif Central and at the Pic du Midi in the French Pyrenees. It is observed that the vertical structure of temperature shows evidence for a Mesospheric Inversion Layer (MIL) on those days on which sprites were observed. A few events are also reported in which sprites were not recorded, although there is evidence of a MIL in the vertical structure of the temperature. It is proposed that breaking gravity waves produced by convective thunderstorms facilitate the production of (a) sprites by modulating the neutral air-density and (b) MILs via the deposition of energy. The same proposition has been used to explain observations of lightings as well as both MILs and lightning arising out of deep convections.