Although the match at Nissan Stadium was deemed a senior side tilt, Mexico's starting XI and bench featured players expected to go the Tokyo Olympics later this summer.
Mexico Under-23 coach Jaime Lozano, who'll lead El Tri in Tokyo, joined manager Gerardo "Tata" Martino as an assistant on the sideline. Lozano will submit his 22-player roster for the Olympics on Friday.
Montes doubled the lead in the 57th minute with a header toward the far post off of Alexis Vega's corner kick.
Panama, going into the match on a seven-game unbeaten streak, were unable to mount much of an offensive effort, with Gabriel Torres' lone effort in the 86th minute sailing way high.
Martin then sealed the win with a goal in the waning minutes of stoppage time.
Mexico is back in action on Saturday in another preparation match against Nigeria in Los Angeles.
In addition to the Olympics, Mexico will participate in the CONCACAF Gold Cup, which takes place on July 10-Aug. 1.