Behavioral thermoregulation by ectotherms through selective timing of activity and habitat use involves costs, as well as the benefit of improved physiological function from maintaining optimal body temperatures. Under the cost-benefit model, reptiles should thermoregulate carefully only when the benefits outweigh the costs. I test this model with quantitative comparisons between populations of ratsnakes (Elaphe obsoleta) experiencing different thermal conditions, and between ecologically similar species that differ in their expected thermoregulatory demands (ratsnakes and racers [ Coluber constrictor]) at the same Illinois location. I also examine the interdependence of habitat use (especially forest edges) and thermoregulatory behavior. Within populations, I examine the effects of season and sex on habitat use and thermal ecology. I use a combination of temperature-sensitive radio transmitters, data loggers to continuously record temperatures, GIS movement analyses, diet and prey availability analyses, and thermal indices that allow direct comparisons among studies. Snake habitat use was not associated with variation in mammal prey availability, and may at least be partly driven by thermoregulatory considerations. Ratsnakes in Illinois used upland forest similarly to those in Ontario. However, preference for thermally favorable edges in my study was weaker than found at the species' northern range limit. In contrast, racers may be confined to habitats that facilitate thermoregulation; preferring edges and successional fields, while avoiding forest interior. Racers were also more active relative to ratsnakes, using larger home ranges while moving further and more frequently through the season. Illinois ratsnakes maintained warmer temperatures closer to their preferred range relative to Ontario ratsnakes, but not as a result of more effective thermoregulation. Racers were also thermoconformers overall, and the least effective thermoregulators among the temperate-zone snakes studied thus far. Therefore, snakes may themoregulate most effectively in challenging environments, when the costs of thermoconformity would be high. However, racers were very effective thermoregulators at times when the relative benefits for doing so should have been greatest. The current cost-benefit model is a useful tool for explaining this aspect of snake biology. However, we need a better understanding of how the associated costs and benefits vary with the ecology of a given species.