The Blades were level heading into the last few moments at Colchester when Edgar popped up to grab all three points and keep United in touch with the League One play-offs.
Billy Sharp had netted United’s opener, only for the struggling hosts to pull level with a Tom Eastman header on 58 minutes.
In midweek, United trailed Wigan 3-0 before a thrilling fightback saw them snatch a 3-3 draw.
Blades boss Nigel Adkins said: “We showed character and resilience in the second half and scored a winner from a set-play. We’ve come away from home and got three points.
“At times we played well and not got the points we deserved but other times like here maybe we’ve got the result on the back of the week we’ve had.
“Well done to the players to show the grit and resilience they have to get the points. Give them credit because they have a bit about them.
“I told the players before the game these are the games that are potentially dangerous this time of the year so great credit to the players.
“There’s a spirit, a fight, a determination, a character and that’s been demonstrated all the way through December and now you can see that
“Sometimes things don’t go your way but we dug deep and got the result we wanted - now we move on.”