The visitors almost took the lead after 28 minutes but Daniel Nardiello diverted Matthew Whichelow's low cross the wrong side of a post from six yards.
David McGoldrick slid Ben Marshall's cross narrowly wide at the other end before midfielder James O'Connor poked home his first goal of the season to put the Owls ahead after 40 minutes.
Madine then doubled Wednesday's lead three minutes later, heading in Marshall's cross after Artur Krysiak had made a mess of Lewis Buxton's original ball in.
Madine sent Krysiak the wrong way from the penalty spot for his second after 75 minutes having been fouled by Danny Coles, and Lines almost added a fourth with a 20-yard drive that came back off a post.
Wednesday went on to record a first clean sheet in eight league games as Exeter's search for a first away league goal of the season continues.