Mets center fielder Carlos Beltran and his wife, Jessica, joined J.Lo and Anthony for a joint ceremony in a hotel penthouse suite, People reported on its Web site.
"Carlos gave his wife a specially engraved ring and gave Marc and Jennifer special rings as gifts," a source told the magazine. "Carlos and Jessica renewed their vows first, then Jennifer and Marc went."
The two couples retied the knot after having dinner together and spending most of the night playing craps.
After hitting it lucky at the tables, Anthony said they should renew their vows, sources said.
"It was totally a spur-of-the-moment thing," a source said. "They decided around 12:30 in the morning that they wanted to do it and started calling for ministers."
The double service was officiated by the Rev. Steven Smith.
The couples were re-wed in a newly renovated penthouse at Caesars Palace.
Wearing a black dress, Lopez looked "beautiful" as 12 people witnessed the ceremony, the source said.
Following the nuptials, a butler opened a bottle of Dom Perignon champagne for the freshly remarried couples.
Earlier in the weekend, Anthony had told pals that he and Lopez had gone to Sin City to continue celebrating his 40th birthday.
Last month, J.Lo tossed a lavish party for her hubby in New York, just hours after she had completed a triathlon in Los Angeles.
The curvy superstar gave birth in February to twins Max and Emme.