Off-spinner Moeen Ali claimed four wickets while Adil Rashid and Jack Leach picked up two wickets each to help England take a healthy lead of 139 runs.
For Sri Lanka, Angelo Mathews top-scored with 52 and put on a 75-run stand for the fifth wicket with Dinesh Chandimal, who made 33.
England were 38 for no loss at stumps in their second innings, stretching their lead to 177 runs.
Earlier England debutant Ben Foakes, who replaced injured Jonny Bairstow converted his overnight 87 to 107 to become only the fifth wicketkeeper-batsman to score 100 in his first Test.
India clinch T20 series
Rohit Sharma struck his fourth Twenty20 international century to help India defeat West Indies by 71 runs.
Sharma hit an unbeaten 111 off 61 deliveries to power the hosts to 192-2.
India restricted West Indies to 124-9 and take an unassailable 2-0 lead in the three-match series.
Bhuvneshwar Kumar, Khaleel Ahmed, Jasprit Bumrah and Kuldeep Yadav took two wickets each.