Tunnel valleys formed by meltwater erosion underneath the margins of the Pleistocene ice sheets are present in high numbers in the Danish onshore area. The geographical distribution of the buried tunnel valleys is uneven, but when comparing with the substrata lithology we find a large number of valleys in areas dominated by low-permeable sediment and a smaller number in areas with highly permeable substrata. The observations point to the drainage capacity of the ice-sheet substratum as an important factor controlling tunnel-valley formation. Tunnel-valley formation appears to be favoured in areas with low-permeable substrata because meltwater drainage through the sediments is impeded, leading to the formation of a channelized subglacial drainage system. The high transmissivity in areas dominated by permeable substrata facilitates drainage of a part of the meltwater as groundwater. This causes a lowering of the subglacial meltwater pressures, and tunnel-valley formation is less likely. Once formed and filled, the tunnel valleys cause a change of the hydraulic properties of the substratum and if subglacial water pressures underneath a subsequent ice advance are sufficiently high, old tunnel valleys will be prone to reactivation.