Steve Cooper's side struggled in the first half as they struggled to adapt to their head coach's new formation, but they improved after the break.
Brewster opened the scoring before Ayew's penalty doubled the advantage. Wednesday manager and Swansea great Garry Monk saw Atdhe Nuhiu pull one back in added time but it was too little, too late for the visitors.
Swansea's defensive crisis saw full-back Kyle Naughton forced to step in as an emergency centre-back before Wednesday winger Jacob Murphy had three fine early chances.
The second saw Adam Reach's cross deflect slightly off Naughton to Murphy at the back post, but with plenty of space he could only spoon over the bar.
Minutes later, Murphy was in on goal again. This time his powerful low shot was saved by Freddie Woodman.
Swansea were operating with a three-man defence with Connor Roberts and Wayne Routledge as wing backs. They looked vulnerable, confused and too narrow, especially on the left with Murphy benefiting.
Alessio Da Cruz had a shot blocked by Marc Guehi and he also headed over but the Owls failed to make their opportunities count in the first half. Brewster's poor free-kick summed up Swansea's struggles.
Swansea's persistence with their shape at the break finally paid dividends after the break, with Ayew having a free-kick saved before the hosts moved ahead.
Roberts crossed from the right, Fulton flicked on, and Brewster was quickest to react as he fired home to open the scoring.
In the 63rd minute, Swansea swapped Routledge for centre-back Mike Van Der Hoorn for his first appearance since January 2 and soon it was 2-0 to the home side.
Roberts attempted to get on the end of Jake Bidwell's cross but was fouled by Reach, who was booked and then replaced, with Ayew stepping up to convert the penalty for his 16th goal of the season.
The fact Wednesday were two behind must have been of huge disappointment to Monk, especially after his team's first-half showing.
Brewster should have made it 3-0 when he raced in on goal from a brilliant Naughton pass but he could only hit the side netting.
The Liverpool loanee left the field late on using his shirt as a makeshift sling to nurse what looked like a shoulder injury.
Nuhiu headed in a cross from fellow Wednesday substitute Kadeem Harris to halve the deficit but Swansea held on.