The invention relates to a method and a device for automatically measuring thicknesses of different mediums. The method comprises steps: 1, a capacitance measuring device is started, capacitance value data of multiple capacitance measuring keys distributed in the vertical direction in an array mode are sequentially acquired by the capacitance measuring device, and a capacitance value data set formed by multiple capacitance value data is obtained; 2, the capacitance value data set is stored in a memory, inflection point searching and processing are carried out on the capacitance value data set to obtain at least one inflection point; and 3, according to positions of the capacitance measuring keys corresponding to all inflection points, thicknesses of different mediums are calculated and obtained, and the measurement is completed. Thus, the thickness of silt and the height of a water level can be monitored for a long time without manual intervention; the accuracy is high; the real-time performance is strong, the mounting is simple, the later maintenance workload is small, large-area extensive input is facilitated, the method and the device can be used for monitoring the thickness of the silt and the height of the water level in a water reservoir, a river way and a pipeline, and reservoir capacity calculation and water quantity measurement.