This use of the god's name is based on the Latin name for Wednesday, which is dies Mercurii in Latin (compare Spanish miércoles, French mercredi, and Italian mercoledì).
The equivalence between Odin and Mercury goes back to the writings of the ancient Roman historian Tacitus.
The image below shows Odin with his ravens Hugin and Munin, Thought and Mind.