The Royals again made life miserable for closer Esteban Yan, who allowed a two-out homer to Ibanez in the ninth inning of a 6-5 loss on Friday.
Mayne connected off Yan on Saturday, belting just his third homer of the season to send the game into extra innings. Yan has blown four of his last five save chances and seven this season.
Jesus Colome (2-7) was the victim in the 12th. Luis Alicea walked and Chuck Knoblauch reached on a bunt single before Sweeney hit his 17th homer to left field one out later. Ibanez followed with a homer to left, giving the Royals back-to-back homers for just the second time this season.
Scott Mullen (4-3) pitched the 11th before allowing the first two runners to reach base in the 12th. Roberto Hernandez recorded the final three outs for his 21st save.
Aubrey Huff drove in a pair of runs for Tampa Bay with a homer in the fourth and a sacrifice fly in the sixth that gave the Royals a 3-2 lead.
The Royals had tied the game, 2-2, in the top of the sixth on an RBI single by Joe Randa.
Tampa Bay opened the scoring in the first on an RBI single by rookie Carl Crawford. The Royals tied it in the second on a sacrifice fly by Mayne.
Devil Rays starter Jorge Sosa allowed two runs - one earned - and three hits in seven innings.
Celebrity Couples of 2014 [PHOTOS]