Acclimation to environmental change can impose both costs and benefits to organisms. In this study we explored to what extent locomotor behaviour of Drosophila melanogaster is influenced by developmental temperature and adult temperature in both the laboratory and the field. Following development at 15, 25, or 31 °C, adult flies were tested for locomotor activity at all developmental temperatures in the laboratory before and after exposure to a cold shock and in the field for their ability to locate resources after a cold shock. Both test (15, 25, and 31 °C) and developmental temperatures strongly affected locomoter activity, with flies developed at 25 °C having the highest activity at all three test temperatures before the cold shock. After the cold shock flies developed at 15 °C had higher activity compared with flies developed at 25 and 31 °C when tested at 15 and 25 °C, and flies developed at 25 °C had the highest activity when tested at 31 °C. Furthermore, flies developed at 31 °C showed longer recovery times following the cold shock at test temperatures of 15 and 25 °C. However, flies acclimated at 15 °C during development did not recover faster at 15 and 25 °C compared with flies developed at 25 °C. There were no significant correlations between recovery time and locomotor activity at any of the test temperatures. Flies developed at 15 °C and exposed to a cold shock before release in the field were much more successful in locating a resource at low field temperatures compared with flies developed at 25 and 31 °C. Our results provide support for both the beneficial acclimation hypothesis and the optimal developmental temperature hypothesis, but the results are highly context dependent and change with the temperature experienced by the individual during its lifetime.