Small endotherms must change roosting and thermoregulatory behaviour in response to changes in ambient conditions if they are to achieve positive energy balance. In social species, for example many bats, energy expenditure is influenced by environmental conditions, such as ambient temperature, and also by social thermoregulation. Direct measurements of daily fluctuations in metabolic rates in response to ambient and behavioural variables in the field have not been technologically feasible until recently. During different reproductive periods, we investigated the relationships between ambient temperature, group size and energy expenditure in wild maternity colonies of Bechstein's bats (Myotis bechsteinii). Bats used behavioural and physiological adjustments to regulate energy expenditure. Whether bats maintained normothermia or used torpor, the number of bats in the roosts as well changed with reproductive status and ambient temperature. During pregnancy and lactation, bats remained mostly normothermic and daily group sizes were relatively large, presumably to participate in the energetic benefits of social thermoregulation. In contrast, smaller groups were formed on days when bats used torpor, which occurred mostly during the post-lactation period. Thus, we were able to demonstrate on wild animals under natural conditions the significance of behavioural and physiological flexibility for optimal thermoregulatory behaviour in small endotherms.