Why mesosphere temperature decreases with height?

I was trying to understand the temperature profile of the atmosphere. I am clear with what causes the temperature variation in troposphere and stratosphere. But when coming to mesosphere i can't understand why temperature decreases with height. It is given that it is due to radiative cooling. i.e molecules emits more energy than they absorb. But why it is so? Can someone please explain the concept?