In soil and leaf mould, and beneath stones, logs and bark.
https://www.buglife.org.uk/bugs/bug-directory/millipedes/
There are about 65 different types (species) of millipede in this country. They, like centipedes, have segmented bodies, jointed legs and a hard exoskeleton Although often confused with centipedes, millipedes are quite different. As they are mainly herbivorous (plant eating) or eat dead plants, they don’t need to be fast or have venomous fangs. Instead their bodies are adapted for pushing through the soil or under stones. Although their name suggests otherwise, they don’t have a thousand legs either, but most common species have between 40 and 400 legs. The main difference from centipedes is that they have two pairs of legs on each segment. Also their antennae are shorter and smaller.