"tract of water-soaked or partially flooded land; wet, swampy ground; piece of low ground, usually more or less wet but often nearly dry at certain seasons," Middle English mersh, from Old English mersc, merisc "marsh, swamp," from Proto-Germanic *marisko (source also of Old Frisian and Old Saxon marsk "marsh," Middle Dutch mersch, Dutch mars, German Marsch, Danish marsk), probably from Proto-Germanic *mari- "sea" (from PIE root *mori- "body of water").
The vowel shift from -e- to -a- began in 15c. and is usual for -er- followed by a consonant: Compare darling (Middle English dereling, Old English deorling), far (Middle English fer, Old English feorr), mar (Middle English merren), hart (Middle English hert, Old English heorot). Marsh gas "methane generated by decaying matter in marshes" is attested by 1819.