The same word as Mal (“time”), from Middle High German māl, from Old High German māl, from Proto-Germanic *mēlą. The sense “meal” developed from “mealtime” as also in cognate English meal. Further cognate with Dutch maal, Danish mål (“goal”).
The orthographic distinction from Mal began in Early Modern German, probably in part under influence of etymology 2 below, which was then becoming obsolete. Later grammarians, at any rate, were in doubt about which of the two was the origin of the word for “meal”.
- “Mahl” in Duden online