The contributions of habitat-forming species to the biodiversity and ecosystem processes of marine and terrestrial ecosystems are widely recognized. Aquatic plants are considered foundation species in shallow ecosystems, as they maintain biodiversity and sustain many ecosystem functions such as primary production and respiration. Despite the increasing amount of biodiversity-ecosystem functioning experiments in seagrass habitats, the effects of benthic variability on ecosystem functioning are rarely investigated across spatially variable aquatic plant habitats. Here, we quantitatively link seasonal variability in seafloor metabolism (i.e. gross primary production and community respiration) with major benthic community components (i.e. microphytobenthos, aquatic plants and macrofauna) across a structural complexity gradient of habitat-forming species (in terms of shoot density and biomass), ranging from bare sand, to a sparse mixture of plants to a dense monospecific seagrass meadow. The increasing complexity gradient enhanced the magnitude of the relationships between benthic community and seafloor metabolism. The daily average seafloor metabolism per season at the bare site was similar to the sparse site, highlighting the role of microphytobenthos for seafloor metabolism in shallow unvegetated sediments. The contribution of the associated macrofauna to the seafloor respiration was similar to the aquatic plant community contribution. Infauna was the main macrofaunal component significantly explaining the seasonal variability of seafloor respiration. However, benthic community-metabolism relationships were stronger within the plant community than within the macrofauna community (i.e. steepest slopes and lowest p-values). Understanding these relationships are a priority since climate change and biodiversity loss are reducing habitat complexity around the world, jeopardizing valuable ecosystem functions and services.