The left-handed Sangakkara scored his 10th Test century and captain Jayawardene was one run away from his 15th as Sri Lanka piled up 227-2 by lunch on the second day in reply to South Africa's 169.
The overnight pair batted through the morning session to take their third-wicket partnership to 213 with Sangakkara unbeaten at the break on 108 and Jayawardene on 99.
Sri Lanka already lead by 58 runs and will be looking to bat the depleted Proteas out of the match in good batting conditions at the Sinhalese sports club.
Sangakkara, freed of his dual role as wicket-keeper after Sri Lanka opted to play a specialist 'keeper in Prasanna Jayawardene, batted fluently to strike 14 boundaries.
His captain provided the perfect foil, holding up the other end but helping himself to 13 fours off the bad deliveries that came his way.
The pair came together on the first evening with Sri Lanka a shaky 14-2 after seamer Dale Steyn removed openers Sanath Jayasuriya and Upul Tharanga in his first two overs.
South Africa, already without regular captain Graeme Smith and Jacques Kallis, missed veteran all-rounder Shaun Pollock who opted out of the first Test following the birth of his second child.
Pollock, who arrived here late Thursday, will be available for the final Test of the short two-match series which starts at the Sara stadium here on August 4.
Stand-in captain Ashwell Prince rotated his five bowlers in hot and humid conditions, but few deliveries beat the broad bats of Sangakkara and Jayawardene.
Sri Lanka, who began the day 41 runs behind South Africa's meagre total, took the lead in the first hour of play which produced 51 runs in 13 overs.
Sangakkara warmed up for the day by pulling the second ball of the morning from Steyn to the square-leg fence and then punched the same bowler through the covers.
The circumspect Jayawardene opened out against Nicky Boje, dancing down the wicket to lift the left-arm spinner for a boundary at extra cover.
Sangakkara reached his century 30 minutes before lunch when he lofted Boje for two runs, the ball narrowly eluding a diving Jacques Rudolph near the mid-wicket fence.