Oldham, who have now gone eight games without a win, were left paying for a dismal start which saw them go 2-0 down after 13 minutes.
Wednesday took only three minutes to go in front as a short corner was worked to Gary Teale, whose cross was headed in from six yards by defender Mark Beevers.
And the lead was doubled when Sedgwick bundled in from close range after poor Oldham defending helped Teale provide another assist.
Oldham pulled one back on 22 minutes – their first goal in more than 10 hours of football – thanks to a 25-yard drive by Filipe Morais which deflected beyond keeper Nicky Weaver.
The home side took control and Morais turned provider on the stroke of half-time, teeing up Dale Stephens for a blistering shot into the top corner from just outside the box.
Wednesday, however, pounced for the winner in the 52nd minute as Sedgwick converted at the far post from Tommy Spurr’s left-wing cross.