Skipper Jayawardene scored an unbeaten 83 and left-handed Sangakkara a solid 67 as Sri Lanka reached 190-3 in their second innings at tea on the third day for an overall lead of 305.
The pair steadied the innings with a 135-run stand for the third wicket after openers Michael Vandort (six) and Malinda Warnapura (eight) fell in the opening nine overs.
Seamer Mahbubul Alam struck in the eighth over when he trapped Warnapura leg-before and Mashrafe Mortaza bowled Vandort in the next over to send the tourists struggling at 18-2.
Jayawardene and Sangakkara then denied Bangladesh success for nearly two hours with their responsible knocks, taking no risks during their big partnership.
The Sri Lankan captain reached his 33rd Test half-century in style, sweeping left-arm spinner Shakib Al Hasan for a four.
He has so far struck one six and nine fours in his 157-ball knock.
Bangladesh's lone success in the afternoon session came when left-arm spinner Mehrab Hossain had Sangakkara caug