Earlier, overnight batsman Ben Foakes made an unbeaten 65 before England were dismissed for 346 to set Sri Lanka a target of 301 runs.
For Sri Lanka, Akila Dananjaya claimed six wickets while Dilruwan Perera took three.
Along with Foakes’s 65, England captain Joe Root's 124 was the highlight of England’s innings.
Sri Lanka’s second innings chase began on a shaky note as they lost the first three wickets for just 26 runs. The three batsmen fell to the guile of left-arm spinner Jack Leach who claimed one more wicket later in the day.
The three setbacks didn’t deter opener Dimuth Karunaratne and Mathews who put on a 77-run partnership for the fourth wicket. Karunaratne was dismissed for 57 by leg spinner Abdul Rashid.
Mathews led Sri Lanka’s charge as he built a 73-run partnership for the fifth wicket with Roshen Silva. However, just when it looked as if Mathews would score his ninth hundred, he fell lbw to off spinner Moeen Ali.
Sri Lanka lost another wicket as Perera was dismissed by Leach for just two.
England lead the three-match series 1-0.