Mesospheric inversion layer and sprites