From the Old French nominative singular, due to the frequent use in the vocative and in phrases of the sort “may God do this and that”.
Dieux m