It reminds me of the legend of Tuan, from the Irish book of invasions, but there's another legend where he seeks ancient knowledge which I think is closer - the story of Culwch and Olwen, from the Welsh Mabinoigen.
URL's to add'l info:
http://www.sacred-texts.com/neu/celt/mab/mab16.htm
http://www.ardue.org.uk/library/book5/invasion.html#legcyc


