The Black Cats have been without both regular right-back Phil Bardsley and Wes Brown, who is also capable of playing in that position, while Carlos Cuellar only returned from injury in the defeat to Manchester City last weekend.
Gardner is more commonly used in a central midfield role, but O'Neill has praised the former Aston Villa player for the way he has adapted to his new position.
"He has done very, very well indeed, Craig. He is essentially a midfield player," said O'Neill.
"I probably didn't expect Phil Bardsley to be out for the length of time that he has been - he injured himself in the first three days of pre-season training."
Gardner joined Sunderland from Birmingham City in the summer of 2011 for a reported £6m fee.