Jayawardene, who received three stitches after he dropped a catch on Wednesday, scored 106 not out and shared an invaluable 139-run partnership with Silva (95) to guide Sri Lanka to 318-4 at close on the second day.
Sri Lanka have gained an important 153 runs lead over Pakistan's first innings score of 165 and a chance to take a lead in the three-Test series after the first match ended in a draw in Abu Dhabi last week.
Mathews, 42 not out, has so far added 91 for the unbroken fifth wicket stand with his illustrious partner to consolidate Sri Lanka's position.
Jayawardene, the 36-year-old former captain, has so far batted for 330 minutes for only his second century against Pakistan and his first in 21 months since his hundred against England in Colombo in April 2012.
More From This Section
Jayawardene-Silva ensured Sri Lanka overcome a disappointing start to the day after they lost Kumar Sangakkara (26) and Dinesh Chandimal (12) in the space of 13 runs.
Silva was finally dismissed leg-before by Mohammad Hafeez soon after tea. He hit ten boundaries during his defiant 330-minute stay at the crease.