The process by which the body adjusts its energy expenditure in response to changes in the environment.