Gene flow is often regarded a random process that homogenizes differences between populations and constrains local adaptation. However, the matching habitat choice hypothesis posits that individuals actively choose those microhabitats that best match their specific phenotype to maximize fitness. Dispersal (and possibly gene flow) may thus be directed. Many studies report associations between habitats and phenotypes, but they may reflect selection, plasticity or adaptation rather than matching choice. Here, we test two predictions from the matching habitat choice hypothesis by manipulating the dorsal colour of Tetrix subulata, a pygmy grasshopper. (1) Is microhabitat choice flexible such that differently manipulated phenotypes distribute themselves differently in a microclimatic and solar radiation mosaic? (2) If they do, are their fitness prospects higher in the more preferred microhabitat? We find that individuals painted white or black do distribute themselves differently, with black individuals residing in habitats with less radiation, on average, than white individuals, demonstrating that microhabitat choices are plastic. Furthermore, white females had more hatchlings than black ones in the increased radiation treatment, and this was mainly due to increased mortality of black females under increased radiation. These findings provide rare experimental evidence in line with predictions from the matching habitat choice hypothesis.