That appreciation is happening whether the unit is rented or empty.
The scenario the landlord sees for a given unit is (assuming zero mortgage costs just to make the math simpler [1]):
Empty unit: $0 in rent + $Y in value appreciation
Rented unit: $X in rent (X>0) + $Y in value appreciation (where Y is fixed between the two scenarios because both cover the same rental unit).
For the landlord, $X + $Y is greater than $0 + $Y.
The landlord's greatest total income is when all units are rented, as then all units are returning $X+$Y.
[1] including mortgage and tax costs adds two subtractions to the formulas above, which will result in a real net loss for an empty unit, as the mortgage and taxes must be paid, irrespective of the rented status of the unit.