Despite the vast literature on the energy-efficiency gap, there is a general dearth of investment models which incorporate the consumer's temporal freedom in the investment decision. Focusing on the building sector, we formulate optimal investment in energy efficiency as a problem of wealth growth-rate maximisation under uncertainty, subject to the diminishing marginal utility of retrofitting. The resulting model provides an unambiguous answer to the question of how much, and at what point in time, consumers with given wealth dynamics and parameters should invest in energy-efficiency measures for their particular dwelling. We treat in detail two foundational wealth dynamics: consumers who solely earn a fixed income, and those whose wealth grows multiplicatively. The differences in decision-making between these cases is seen to be substantial, with the latter group exhibiting further significant heterogeneity. All of this has profound implications for the social planner: on the one hand, we show how he must work harder to influence wealthier consumers; on the other, the model provides a methodology for crafting highly targeted policy interventions.