Sedimentary rocks are made when sand, mud and pebbles get laid down in layers. Over time, these layers are squashed under more and more layers. Eventually, the layers are lithified – turned to rock. Sedimentary rocks can be formed in deserts, lakes, seas, and rivers .