There are many factors involved in the improvement in the life expectancy such as sanitation, housing, scientific research to cure many diseases and infections, education etc.
Historically it was the nineteenth and early twentieth century when all these improvements were made due to which the mortality rate decreased intensively in early and middle ages.