In hot but not overwhelming conditions, the eighth-seeded Scot was convulsing at times in the third and fourth sets but somehow managed to beat Dutchman Robin Haase 6-3 7-6 (6) 1-6 7-5 at Flushing Meadows.
"I felt extremely good before the match, and I did train very, very hard to get ready for the tournament," said Murray, who confirmed that he did not call for the trainer because he didn't think he was allowed to.
"For me it was unexpected, and therefore, quite difficult mentally to deal with ... especially after an hour and 40 minutes.
"The fact that it was the whole body would suggest that maybe it was something to do with my eating or drinking, because if it's through fatigue in one part of your body, then that would probably be down to conditioning.
"But cramping in my left forearm? I didn't use my left forearm a whole lot today compared with other parts of my body, so I would expect it would be something to do with what I have eaten or something or not eaten."
Renowned as one of the fittest players on the ATP Tour, Murray arrived in New York raving about his mid-season fitness programme in Florida with new coach Amelie Mauresmo.
Finally free of pain, almost a year after back surgery, Murray looked lean and strong as he took to the court and though his tennis was patchy, his movement was good as he took the first two sets.
But from 2-1 in the third set, it was obvious something was wrong and as he cramped up, Haase took advantage to take the third set and lead 5-3 in the fourth.
Moving slightly better but still nowhere near 100 percent, Murray sliced and diced his way back to 5-5 and as Haase faltered, he clinched a dramatic victory.
"I'm happy ... because I could have easily lost that match. I was very close to losing the match," said Murray. "I certainly wouldn't have been the favourite if it had gone to five sets. I'm happy about that."
Murray said he hoped he would be able to recover to be 100 percent for his next match, against Germany's Matthias Bachinger.
"Maybe I will speak to a nutritionist and look at what I had eaten the last three, four days," he said.
"These (grand) slams are physically challenging, but I need to work out why that happened because I shouldn't be cramping after one hour, 45 minutes, regardless of the temperature," Murray said.
"It was hot but it wasn't particularly humid and we didn't play a lot of long rallies," he said.

Latest News from Sports News Desk