With both teams preparing for major European finals next month and meeting for the first time in a major domestic final, Inter made nine changes from Sunday's defeat by Napoli, starting in-form striker Romelu Lukaku on the bench and Samir Handanovic replacing Andre Onana in goal.
Fiorentina took the lead after three minutes when Jonathan Ikone sent in a cross that found Nico Gonzales unmarked at the back post, and he drilled the ball into the net.
Edin Dzeko had a clear chance to equalise halfway through the half, but he could not keep the ball down when keeper Pietro Terracciano came rushing out and sent his shot over the crossbar.
"We started badly and had the wrong approach, which is rare for us, but the lads did well to stay in the game anyway and then turn it around," Inter manager Simone Inzaghi told Mediaset.
"I am happy, because we won a cup that we wanted, to confirm what we did last season. Fiorentina are a quality team who caused us a lot of problems."
Inter have had a successful season, retaining the Coppa Italia and Italian Supercup titles and reaching next month's Champions League final against Manchester City.
"We have the final two Serie A games, then Istanbul and a great season we want to keep going," Inzaghi added.
Argentine Martinez did level with a shot from a tight angle in the 29th minute and followed up with a close-range volley high into the net eight minutes later.
"In all honesty, I am moved, because for a few years, we have been bringing trophies to this great club, and we must continue like this. I am very happy," Martinez said.
"I am very happy to bring this trophy back to Milan, or rather keep it there, seeing as that’s where it was last year."
Fiorentina rarely threatened to get back into the match and Terracciano showcased his goalkeeping skills by making a remarkable double save to deny Lukaku's powerful strike and Federico Dimarco's follow-up.
Fiorentina's best chance to equalise came when Luka Jovic's strike was saved by Handanovic but Inter held out comfortably before celebrating their ninth Coppa Italia title.
Fiorentina face West Ham United in the Conference League final on June 7 and Inter play City in the Champions League final on June 10.