The most massive haloes at high redshift are expected, according to hierarchical cosmologies, to reside in the most biased density fields. If powerful active galactic nuclei (AGN) are expected to exist anywhere in the early Universe (z>5), it is within these massive haloes. The most luminous of these AGN, powered by supermassive black holes (SMBHs) ~10^9Msun, thereby present an opportunity to test models of galaxy formation. Here, we present submillimetre (submm) continuum images of the fields of three luminous quasars at z>5, obtained at 850 and 450um using the Submm Common-User Bolometer Array (SCUBA) on the James Clerk Maxwell Telescope (JCMT). N-body simulations predict that such quasars evolve to become the central dominant galaxies of massive clusters at z=0, but at z=5-6 they are actively forming stars and surrounded by a rich proto-filamentary structure of young galaxies. Our images show evidence of extended emission on a scale of ~100kpc from at least one quasar - indicative of a partially resolved merger or a colossal host galaxy. In addition, at >3sigma significance we detect 12 (5) submm galaxies (SMGs) at 850um (450um) in the surrounding fields. Number counts of these SMGs are systematically overabundant relative to blank-field submm surveys. Whilst the redshift-sensitive 850um/450um and 850um/1.4GHz flux density ratios indicate that some of these SMGs are likely foreground objects, the counts suggest that many probably lie in the same large-scale structures as the quasars.