The Kings won their third in a row and climbed to 80 points, putting them in a three-way tie for ninth place with San Jose and Calgary.
The seventh through 11th spots in the West are separated by a single point.
Martinez scored 2:40 into the game and Los Angeles then got first-period goals from Anze Kopitar and Justin Williams.
The Ducks climbed back within one on goals from Cam Fowler in the second period and Luca Sbisa 3:53 into the third.
NBC reportedly holds celebs hostage to Jimmy Fallon's show
Millions of Getty images now available for free via embed tool