World number nine Wawrinka, who beat fellow Swiss Federer in last year’s final, lost 6-1 6-2 to Bulgaria’s world number 11 Grigor Dimitrov.
Second seed Federer was beaten 6-4 7-6 (7-5) by Frenchman Gael Monfils, the world number 18 and 14th seed.
Eight-times winner Rafael Nadal beat America’s John Isner 7-6 (8-6) 4-6 6-3.
The Spaniard, who won every title at the clay court event from 2005-12, saved two set points in the opener but broke big-serving Isner in the fourth game of the decider.
Nadal faces compatriot David Ferrer in the fourth round after he beat France’s Gilles Simon 6-2 6-7 (3-7) 6-1
Monfils’s victory over 17-time Grand Slam champion Federer was his second successive triumph on clay after his straight sets win during last year’s Davis Cup final.
Federer, 33, four times a beaten finalist in this event, was competing for the first time since losing to Novak Djokovic in the Indian Wells finalnearly four weeks ago.
He was broken in the ninth game of the first set and then squandered a 5-3 lead in the second set tie-break, losing four successive points.
Wawrinka had won two of the previous three meetings with Dimitrov, including a clay court encounter at the 2013 World Tour Masters in Madrid.
But the 30-year-old Swiss made 41 unforced errors and had just four winners against the ninth seed.
He was guilty of 13 of those unforced errors as Dimitrov raced 4-0 ahead, and failed to convert four break points in the sixth game of the second set.