There's lot's geo-thermal energy in the Middle Ages probably because Lavos stores enough nurishment for hibernation(remember that he's inactive for almost 15,000 years.) Besides, he sucks more than enough nurishment for 65 million years.
Since heat returns to Earth, life blooms once again. And because of it, he continues gather more DNA data to evolve futher while hibernating.