The Scot took the opening set in a tiebreak as momentum swung freely between the two veterans.
However, the second set went the way of Wawrinka as Murray tightened up with muscle cramps.
The 35-year-old then showed a lot of courage and toughness in the decider, battling back from an early break to claim victory 7-6 (5) 4-6 6-4.
Murray acknowledged the physicality of the match in his on-court interview.
“The court is pretty lively when the weather is like this. Physically I feel tired,” he said.
“I had some issues with cramp during the match, the same as Washington, so that is something I need to get on top of.
“I tried to take the ball on a little more and finish points at the net. I wasn’t that successful when I came up, but the intention was there. I was a little more offensive on the second-serve return. Last game I was just fighting, trying to find a way through.”
The win sets up a second-round clash with Englishman Cam Norrie, who was tested by Dane Holger Rune in their opening clash.
The world number 11’s path to victory mirrored Murray’s as he ultimately overcame his teenage opponent 7-6 (5) 4-6 6-4.