What the OP is asking about is what phoneticists call **“r-coloring.” ** In English, the sound of [r] is made by a retroflex position of the tongue—the tip of the tongue bent up and a little backward. This placement of the tongue affects the vowel that precedes it. Some dialects have it, some don’t. Some have it more, some have it less. This accounts for the variations described here.
Born and raised in Ohio, I pronounce all three the same. The vowel in all three is the open [E] as in “met.” The r-coloring has reduced the originally 3 different vowels into one.
In Boston, so I understand,
“marry” has the flat [æ] sound as in “matter.”
“Mary” has the close [é] sound as in “mate”.
“merry” has the open [E] sound as in “met”.
The Allegheny Mountain ridge in central-western Pennsylvania has been identified as the boundary between the dialect areas where to the east the 3 vowels are different, and to the west they’re all [E]. The r-coloring has moved the /æ/ sound forward, and the /é/ sound downward, so that they meet in the middle which is [E].
When I drive on the Pennsylvania Turnpike, I notice how Allegheny Mountain seems to form a natural boundary. After going through the tunnel, the weather is often different on one side from the other. Perhaps the flora and fauna are slightly different too. When you travel through there and see the lay of the land, you get a sense of how it could form a dialect boundary too.