The pair first won the title in the relay event in Manchester in 2008 and reprised their partnership at the Lee Valley VeloPark to great effect.
Cavendish now has three world titles in the discipline, after also winning the 2005 title with Rob Hayles in Los Angeles.
It was Great Britain's fifth gold of the competition after Laura Trott earlier on Sunday won the women's omnium.
Wiggins took off his helmet to salute the crowd in celebration and Cavendish raised his arms aloft as 'the boys are back in town' was played at the velodrome.
Cavendish crashed inside the final 10 laps of the Madison with Britain in the lead and Wiggins in the race. But the pair held on for victory.
Britain's Jon Dibben won the points race, Jason Kenny the sprint and Trott the scratch race before taking her second title on Sunday's fifth and final day.
Trott enhanced her advantage with a mature display in the concluding points race.
The 23-year-old from Cheshunt now has seven world titles, three individual crowns and a first omnium world title since 2012, when she went on to win Olympic gold. She will hope for a repeat in Rio in August.
Trott finished with 201 points and France's Laurie Berthon claimed silver on the last of 10 sprints in the points race to beat Sarah Hammer of the United States by one point. Berthon finished with 183 points to Hammer's 182.
Kenny, the sprint champion on Saturday and Trott's fiance, sat up on the final lap of the men's Keirin, won by Germany's Joachim Eilers, after a gruelling programme caught up with him.
The 2013 champion completed the race, finishing sixth as Ed Dawkins of New Zealand took silver and Awang Azizulhasni of Malaysia bronze.
Trott has long targeted Sir Chris Hoy's British record haul of six Olympic gold medals and moved within four of his World Championship tally of 11 with the victory.
"I love the number seven - I can retire happy now," said Trott, who has four team pursuit world titles to her name and won bronze in the event on Friday.
"I might be able to do four in one go, because I could do the omnium, the team pursuit, the points race and the scratch."
Trott had 184 points entering the concluding points race after consolidating her advantage in the fourth and fifth disciplines.
She was third in the 500 metres time-trial and Hammer, the joint overnight leader, 10th.
It meant Trott opened up a 14-point lead ahead of the flying lap, the penultimate discipline.
Trott was third, Hammer fifth and Berthon second, as in the time trial, to move second overall.
The Briton won the first and fifth sprints to take a near-unassailable lead which she protected to the finish.
Trott said: "I'm just so happy. It's taken me four years to get a gold medal back in the omnium. It was just incredible.
"I was a little disappointed that I didn't win the elimination race. I rode stupidly. I should've taken Sarah down to the black line and I didn't. I took her up and I kept it fast. That is something that she's good at. I couldn't match her.
"(I was) not angry, just disappointed. Elimination race is my thing. I really enjoy that event. I felt like the wind had been blown out of my sails a little bit.
"I had such a high after Jason won the sprint that I was buzzing and after that, I was 'oh, okay'.
"Today it was a new day, I woke up feeling really positive."