Ecosystems worldwide are facing habitat homogenization due to human activities. While it is commonly proposed that such homogenization can have negative repercussions for ecosystem functioning, this remains to be explicitly studied. Here, we expand on the framework for the functional consequences of biodiversity loss, by scaling up from the level of species to the level of entire habitats. Just as species diversity generally begets ecosystem functioning through positive interactions, we hypothesize that different habitats within ecosystems can facilitate each other through structural complementarity and by the exchange of material and energy. We show that experimental ecosystems constituted by a diversity of habitats have higher levels of multiple ecosystem functions compared to ecosystems with low habitat diversity. The effect of habitat diversity on multifunctionality varied with season; it was direct in summer, indirect via changes in species diversity in autumn, whereas there was no effect in spring. We propose that jointly considering habitat and species diversity will prove valuable for both research and environmental management.