Ice streams are fast flowing regions of ice that generally slide over a layer of unconsolidated, water-saturated subglacial sediment known as till. A striking feature that has been observed geophysically is that subglacial till has been found to accumulate distinctively into sedimentary wedges at the grounding zones (regions where ice sheets begin to detach from the bedrock to form freely floating ice shelves) of both past and present-day ice sheets. These grounding-zone wedges have important implications for ice-sheet stability against grounding zone retreat in response to rising sea levels, and their origins have remained a long-standing question. Using a combination of mathematical modelling, a series of laboratory experiments, field data and numerical simulations, we develop a fluid-mechanical model that explains the mechanism of the formation of these sedimentary wedges in terms of the loading and unloading of deformable till in three dynamical regimes. We also undertake a series of analogue laboratory experiments, which reveal that a similar wedge of underlying fluid accumulates spontaneously in experimental grounding zones, we formulate local conditions relating wedge slopes in each of the scenarios and compare them to available geophysical radargram data at the well lubricated, fast-flowing Whillans Ice Stream.