As the upper air sinks (subsides) it warms.
This can lead to warmer air in the mid troposphere than at the surface.