The habitats where marsh fern~(Thelypteris palustris) grows:

Coastal floodplain grazing marsh
Lowland fen
Moist damp verges and banks
Purple moor grass and rush pasture
Reedbed
Wet woodland