Maiden Test hundreds by Prasanna Jayawardene and veteran seamer Chaminda Vaas capped a solid batting display by the hosts. while captain Mahela Jayawardene and opener Michael Vandort also reached three figures.
Having shot out Bangladesh for 89 on the opening day, Sri Lanka piled up 577-6 in their first innings before declaring 15 minutes before close of the second day's play.
Bangladesh, trailing by 488 runs, safely negotiated three overs before close to finish the day on three for no loss.
Sri Lanka's run deluge left Bangladesh facing an uphill struggle to avoid defeat in the first of three Test matches on their five-week tour.
Mohammad Ashraful's tourists lasted just 32.3 overs on the first day with Muttiah Muralitharan taking five wickets after seamer Dilhara Fernando had destroyed the top order with three wickets.
Runs came easily against the tiring Bangladesh attack that lacked the firepower to disturb the batsmen on the easy-paced wicket at the Sinhalese Sports Club.
It was Sri Lanka's highest total against Bangladesh, surpassing their 555-5 declared when the two sides met for the first time in September 2001.
Bangladesh were frustrated by an unbroken seventh-wicket stand of 223 between Prasanna Jayawardene and Vaas after Sri Lanka were restricted to 354-6 in the post-lunch session.
The partnership was Sri Lanka's best ever for the seventh wicket, easily going past the 194 between Hashan Tillakaratne and Thilan Samaraweera against India in 2001.
Prasanna Jayawardene, the team's wicket-keeper after Kumar Sangakkara preferred to play as a specialist batsman, compiled his first century in only his 10th Test.
Mahela Jayawardene declared the innings soon after Vaas, a veteran of 97 matches, got his maiden ton.
Earlier, left-handed Vandort, a late replacement for the injured Upul Tharanga, hit 117 with the help of nine boundaries and three sixes.
Mahela Jayawardene, who had retired hurt the previous day on 93 due to leg cramps, returned at the fall of Vandort's wicket before lunch and duly completed his 17th Test century.
The captain, who was on 126 at lunch, added just one more run when he fell to the second new ball, punching Mashrafe Mortaza's fourth delivery to Abdur Razzak at point.
Mahela Jayawardene took over as Sri Lanka's second-highest scorer with 6,416 runs in 86 Tests, behind only Sanath Jayasuriya's record tally of 6,791.
Vandort, who resumed at his overnight score of 87, hit two consecutive sixes off left-arm spinner Razzak to move to 99 and then clipped two runs to mid-wicket in the same over to reach his third Test century.
Vandort put on 117 for the fourth wicket with Tillakaratne Dilshan when he was caught in the leg trap by Shahriar Nafees off spinner Mohammad Rafique.
Bangladesh earned a lucky break when Dilshan was run out for 79 after Mahela Jayawardene declined his call for a second run.