The concept of a tooth-worm, which according to popular belief, caused caries and periodontitis, has existed in diverse cultures and across the ages. During the Enlightenment, however, the theory of the tooth-worm was assigned by medical doctors almost exclusively to superstition. Even so, the idea that toothache was caused by gnawing worms held on even into this century. There were many different ideas with regard to the appearance of tooth-worms. In England, for instance, it was thought that the tooth-worm looked like an eel. In Northern Germany, people supposed the tooth-worm to be red, blue, and gray and in many cases the worm was compared to a maggot. The gnawing worm was held responsible for many evils and, in particular, was blamed for toothache provoked by caries. . . . In popular medicine, numerous therapies were applied in order to eradicate the tooth-worm. In addition to the fumigations with henbane seeds, which allowed the "tooth-worm" to develop in the form of burst seeds, there were also magical formulas and oaths. -- W.E. Gerabek, Clin Oral Investig. 1999 Apr 3(1):1-6.
According to Al Hamdani and Wenzel in "The Worm in the Tooth," Folklore 77 (1):
The fumigation of worms from the teeth by burning seeds has a long history. Scribonium Largus is the first to mention fumigation with smoke of burning henbane . . . . (Townend, “The Story of the Toothworm,” Bulletin of the History of Medicine 15 (1) January 1944: 46,47)
This bears some resemblance to the Anglo-Saxon Leechcraft formula quoted by Townend . . . . The Anglo-Saxon formula is as follows; "For tooth worm, take acorn meal and henbane seed and wax of all equally much, mingle these together, work into a wax candle and burn it, let it reek into the mouth, put a black cloth under it, then will the worms fall onto it." Jacques Houllier (1498-1562) condemns this procedure, saying that when henbane seed is burnt what appear to be little worms fly from it even if the smoke is not near an affected tooth.