Having been dropped to the bench for the match, the 25-year-old came on as a second-half substitute and scored with his first touch before heading off the line to help the Latics to a 3-2 win over West Bromwich Albion.
While he admits that the player didn't take kindly to being rested, Martinez is adamant that it was all part of his plan.
"It was planned," Martinez told Sky Sports News. "James was our best player against Spurs [the previous week] and he didn't lose his place based on his performance.
"I knew the game would need energy, a second injection of blood in the last 20 to 25 minutes.
"James didn't understand that before the game but the attitude he showed was incredible and his first touch changed the game completely."
Wigan host Swansea City on Tuesday night.