The terrain.cfg is saved when you save the map, there is no way to get it back.
Sometimes when/if you export maps and don't save afterwords, this will happen. Some people make backups of their maps files. I do not think there is a way to get it back.
(Someone correct me if I'm wrong)