In medieval Dutch literature, this is the name of the eponymous character of Karel ende Elegast ("Charles and Elegast"), a 13th-century epic poem about Charlemagne and his friend, the noble knight Elegast.
The name suffix -vain appears in this and other Arthurian names such as Yvain and Agravain.
In the English-speaking world this name has been occasionally given since the early 20th century. It started rising in America after the variant Lorelai was used for the main character (and her daughter, nicknamed Rory) on the television series Gilmore Girls (2000-2007).