The left-arm spinner dismissed skipper Mushfiqur Rahim and Mohammad Mahmudullah in four overs before Bangladesh reached 155 for five in their first innings at tea.
Mominul Haque, who made 55 on debut in the drawn first Test in Galle, was unbeaten on 63 with Nasir Hossain three not out after the visitors had been put in to bat.
Rahim, who became the first Bangladeshi to score a Test double-century in the last match, was bowled for seven while Mahmudullah (8) was caught by skipper Angelo Mathews, who dived from the slips to take a smart catch.
The 21-year-old Mominul put on 49 for the third wicket with opener Jahurul Islam to steady the innings after Bangladesh had lost two crucial wickets in the first session.
Brief Scores: Bangladesh 240 (Mominul Haque 64, Nasir Hossain 48; Rangana Herath 5 for 68) lead Sri Lanka 18 for 1 (Dimuth Karunaratne 12*; Robiul Islam 1 for 12) by 212 runs