Environmental temperature is one of the most important abiotic factors affecting insect behaviour; virtually all physiological processes, including those which regulate nervous system function, are affected. At both low and high temperature extremes insects enter a coma during which individuals do not display behaviour and are unresponsive to stimulation. We investigated neurophysiological correlates of chill and hyperthermic coma in Drosophila melanogaster. Coma resulting from anoxia causes a profound loss of K+ homeostasis characterized by a surge in extracellular K+ concentration ([K+]o) in the brain. We recorded [K+]o in the brain during exposure to both low and high temperatures and observed a similar surge in [K+]o which recovered to baseline concentrations following return to room temperature. We also found that rapid cold hardening (RCH) using a cold pretreatment (4°C for 2h; 2h recovery at room temperature) increased the peak brain [K+]o reached during a subsequent chill coma and increased the rates of accumulation and clearance of [K+]o. We conclude that RCH preserves K+ homeostasis in the fly brain during exposure to cold by reducing the temperature sensitivity of the rates of homeostatic processes.