Communities of invertebrates are notably shaped by temperature, driving trends in composition and diversity. Yet few studies have examined how thermal niches of taxa may vary across distinct ecosystems, such as lakes and streams. The U.S. Environmental Protection Agency’s National Aquatic Resource Surveys (NARS) offers a unique opportunity to compare how the influence of temperature on benthic macroinvertebrates varies between ecosystem types across the conterminous U.S. Multivariate random forest (MVRF) models of taxon (genus-level) distributions within each ecosystem type allowed us to assess the relative importance of temperature in structuring assemblages as well as characterize the variation in thermal niches among shared genera. To examine thermal niches, we used accumulated local effect plots based on MVRF predictions of genus probabilities to assess how genera responded to temperature, while removing the influence of non-temperature factors used in the MVRF models. Modeled summer water temperature was a top predictor in lotic and lentic ecosystems for macroinvertebrate genera relative to other watershed factors. Several genera, such as the mayfly Caenis, have similar thermal response curves between lentic and lotic ecosystems, but thermal optima were, on average, 2°C higher in lentic ecosystems relative to lotic ecosystems. Some genera, such as the caddisfly Mystacides, have response curves that differ slightly between the ecosystem types, suggesting different parts (ex: lower vs upper thermal limits) of the complete thermal niche may be captured by samples in each ecosystem type. Other genera have thermal response curves that differ completely between lentic and lotic ecosystems, which may reflect sub-genus level variation and/or adaptation specific to the ecosystem. Thermal niches may be conserved across ecosystem types for many macroinvertebrate genera, but substantial variation among some genera suggests the thermal range of a single ecosystem type, even at a large spatial scale, may not adequately capture the full niche of many genera.