Answer
When a parcel of air rises toward the mountaintop, it expands and does work on the surrounding lower-pressure air. This work reduces the parcel's internal energy, and its temperature drops.
Work Step by Step
This is discussed on pages 341-342.