1520s, originally a second crop of grass grown on the same land after the first had been harvested, from after + -math, from Old English mæð "a mowing, cutting of grass," from PIE root *me- (4) "to cut down grass or grain."
Also known as aftercrop (1560s), aftergrass (1680s), lattermath, fog (n.2). Figurative sense is by 1650s. Compare French regain "aftermath," from re- + Old French gain, gaain "grass which grows in mown meadows," from Frankish or some other Germanic source similar to Old High German weida "grass, pasture."
When the summer fields are mown,
When the birds are fledged and flown,
And the dry leaves strew the path;
With the falling of the snow,
With the cawing of the crow,
Once again the fields we mow
And gather in the aftermath.
[Longfellow, from "Aftermath"]