The Belgian netted his 27th of the campaign in all competitions to put Napoli ahead moments after the interval at Stadio San Paolo.
It is Mertens' 18th goal in his last 16 games and the former PSV man is now just one shy of matching his tally of league goals for the last three seasons combined.
Maurizio Sarri's side were far from at their best, though, and Udinese could have restored parity when Duvan Zapata - on loan from Napoli - hit the woodwork, only for Allan to double the hosts' tally against his former club in the 63rd minute after capitalising on an Udinese mistake.
Jose Callejon volleyed home a third to ensure there was no way back for the visitors, while Arkadiusz Milik went close to adding a fourth.
It represents a first loss in six Serie A outings for Udinese, while Napoli move onto 70 points and just two behind Roma, who were held to a 1-1 draw by Atalanta, with six fixtures remaining.