Human labor was very cheap in the early middle ages. Late Roman practices of employing agricultural slaves, and enlisting more slaves as war booty continued to be popular. Towards the high middle ages, slaves were replaced by serfs since lords found that emaciated slaves were not very effective workers, and the practice of selling slaves and splitting families was not conducive to propagating the slave lineage. As mobility increased, serfs could escape to towns, hide for a year and gain legal freedom. Other paths to freedom included going to the frontier, where lords wanting peasants to develop their regions would offer peasants freedom and a small slice of land to farm.
The cost of labor went up further after the population was decimated by the Black Death and the supply of peasant workers plummeted.
As the cost of human labor went up, old mechanical power devices that were initially not economical were rediscovered. The water mill was known in Roman times, but just didn't make economic sense: a slave gang could more cheaply rotate the millstone directly. Windmills could operate in northern Europe even in the fall, when streams driven by ice melt dried up, and even in the winter, when rivers would freeze over.
graph TD BD[Black Death] --> |Supply of workers decimated| HL[Human Labor Cost] HL --> |Economics| ML[Mechanical Labor] ML --> PP[Peasant Prosperity] HL --> PP style Inventions fill:yellow,stroke:#333,stroke-width:4px Inventions[Watermills<br/>Windmills<br/>Tidal mills] --> ML