Alex Neil’s side opened the scoring on the stroke of half-time when Jack Clarke was fouled in the penalty area and Ross Stewart converted the subsequent spot kick.
The hosts drew level just after the hour mark when Bailey Wright conceded a penalty and Sean McConville sent Anthony Patterson the wrong way, before substitute Kodede Adedoyin made it 2-1.
The Black Cats have one more friendly ahead of their Championship opener against Coventry next weekend, with the team set to travel to Hartlepool on Monday.
1. Anthony Patterson - 5
Little he could do about either goal and was let down by his defence. Distribution was inconsistent. 5 Photo: Frank Reid
2. Lynden Gooch - 6
Did his defensive work well and broke forward to support the counter where he could. A solid display in what looks increasingly like his permanent right-back role. 6 Photo: Frank Reid
3. Daniel Ballard - 7
Superb in the first half, almost scoring one outrageous goal and making some big defensive interventions. Looked to be troubled by a knee niggle for the latter stages, which Sunderland will hope is only a minor issue. Did play through it. Looks a cert to start next week if fit. 7 Photo: Frank Reid
4. Bailey Wright - 5
Excellent through the first hour, but an error in possession let Accrington Stanley back into the game from the penalty spot. It was a bad 20 minutes from Sunderland who had been in complete control of the game. 5 Photo: Frank Reid