Habitat structure affects the distribution of fishes, particularly across reef-dominated habitats, but few studies have connected patterns in the abundance of soft-bottom fishes with the structure of the habitat. The spatial and temporal patterns of variation in the abundance, biomass and population structure of the pearly razorfish, Xyrichtys novacula, inhabiting sand-Cymodocea nodosa seagrass mosaics were described through two complementary techniques: underwater visual counts and seine nets. We sought to analyse whether biotic (seagrass shoot density, leaf length and meadow cover) and abiotic (sediment composition and particle size) structural elements explained variation in patterns of abundance and biomass. Underwater visual counts registered a larger abundance of individuals and proved significant variation in fish abundance and biomass at the scale of locations, which was otherwise not detected through seine nets. Seasonal variation in fish abundance and biomass was, in all cases, minor. Habitat structural elements helped to explain patterns in fish abundance and biomass. This fish species was particularly abundant in sediments dominated by coarse sands in continuous meadows of C. nodosa (>90% seagrass cover) with intermediate densities of 500 to 1000 shoots m–2, followed by large-sized seagrass patches with >1000 shoots m–2. A trade-off between protection provided by seagrass canopies and protection derived from its burial behaviour, limited under high seagrass shoot densities, may explain spatial variation patterns.