Martins reacted quickest to turn the ball in after Kevin Volland's shot crashed back off the post. The goal was initially flagged for offside but that decision was overturned by the Video Assistant Referee.
Marseille, who have won only five of their 14 home matches this season, remain in third place in the table with 47 points from 27 games. They trail leaders Paris Saint-Germain by 15 points and are two behind second-placed Nice.
Bouanga had a first-half goal ruled out for handball, but there was no doubt about his effort on 52 minutes as a poor clearance landed at his feet and he thumped a shot into the back of the net.
They had a bit of luck early on when Mama Balde's penalty was saved by home goalkeeper Gaetan Poussin, who then knocked the ball into the net with his trailing leg for an own goal.
The visitors added a second with five minutes remaining having been awarded a second spot-kick, this time converted by Lebo Mothiba.
Rennes moved up to fourth with a 2-0 victory over Angers, their third win in succession but a sixth straight loss for their opponents.
Lille moved up to seventh with a 4-0 hammering of Clermont. Their first two goals were set up by Renato Sanches, whose cross was headed in by Jonathan Bamba before he laid on an inch-perfect pass for Jonathan David.
Zeki Celik added a third for the home side when Clermont goalkeeper Ouparine Djoco could not hold onto a shot, and Edon Zhegrova saw his shot deflected in late on. (Reporting by Nick Said Editing by Toby Davis and Pritha Sarkar)