We investigate interlayer adhesion and relaxation at interfaces between graphene and hexagonal boron nitride (hBN) monolayers in van der Waals heterostructures. The adhesion potential between graphene and hBN is calculated as a function of local lattice offset using diffusion quantum Monte Carlo methods, which provide an accurate treatment of van der Waals interactions. Combining the adhesion potential with elasticity theory, we determined the relaxed structures of graphene and hBN layers at interfaces, finding no metastable structures. The adhesion potential is well described by simple Lennard–Jones pair potentials that we parametrize using our quantum Monte Carlo data. Encapsulation of graphene between near-aligned crystals of hBN gives rise to a moiré pattern whose period is determined by the misalignment angle between the hBN crystals superimposed over the moiré superlattice previously studied in graphene on an hBN substrate. We model minibands in such supermoiré superlattices and find them to be sensitive to the 180° rotation of one of the encapsulating hBN crystals. We find that monolayer and bilayer graphene placed on a bulk hBN substrate and bulk hBN/graphene/bulk hBN systems do not relax to adopt a common lattice constant. The energetic balance is much closer for free-standing monolayer graphene/hBN bilayers and hBN/graphene/hBN trilayers. The layers in an alternating stack of graphene and hBN are predicted to strain to adopt a common lattice constant, and hence, we obtain a stable three-dimensional crystal with a distinct electronic structure.