'There is sufficient time for Sri Lanka Cricket to choose a captain and prepare the team for the 2019 World Cup in England.'
Sri Lanka Cricket (SLC) president Thilanga Sumathipala said the board has accepted Mathews' resignation following a shock one-day series defeat by Zimbabwe, which the all-rounder described as one of the lowest points of his career.
"As a captain, I can't turn a blind eye to the failure of the team in the past several months," Mathews told a news conference where the new captains were named, referring to the team's struggles since the 2015 World Cup.
"There is sufficient time for Sri Lanka Cricket to choose a captain and prepare the team for the 2019 World Cup in England.
"I wanted to take this decision sometimes back. But I had to stay because of the team. Now Upul and Dinesh are capable of carrying the duty."
Sri Lanka's new captains have little time to adjust to their roles as the side hosts Zimbabwe in a one-off Test starting on Friday, before welcoming India for a full series from July 26, featuring three Tests, five one-dayers and a Twenty20 match.
The 1996 world champions, currently ranked seventh in Tests and eighth in one-dayers, are also vying with West Indies for the last available automatic place in the 2019 World Cup.
Chandimal said he is looking forward to receiving guidance from Mathews as he begins his tenure against Zimbabwe in Colombo before taking on the top-ranked team in Test cricket.
"I thank Angelo for leading the team and it is not an easy task," the 27-year-old said.
"We have lots of ups and down in the last two years, but we have a lot of talented young and senior players in the team.
"I am happy about being entrusted (with) this post. I am going to put my heart and soul to put the team in the right position."
Mathews marks his return to the Test side against Zimbabwe after missing the previous home series against Bangladesh through injury. Friday's match will be the first he plays in without being in charge since 2013.
Image: Angelo Mathews
Photograph: Getty Images
Ravi Shastri named new India head coach
All you need to know about head coach Ravi Shastri
Kohli continues to lead ICC ODI rankings
We respect Kohli's decision, he is going to lead the team, says Ganguly
Srinivasan's plan succeeds as BCCI postpones SGM