Both Thirimanne, who scored a career best 91 just three days after joining the squad as an emergency replacement, and Jayawardene, who hit 72 in his penultimate innings as captain, threatened to make a sunny day in Sydney their own.
Ultimately though, Australia captain Michael Clarke's decision on winning the toss to send his pacemen out to bowl first was all but vindicated and the hosts will have finished the day confident they can wrap up the series 3-0.
Jackson Bird, the least experienced of the pace quartet, took 4-41, Mitchell Starc 3-71 and Peter Siddle grabbed a brace with spinner Nathan Lyon pitching in to end Thirimanne's knock just shy of his maiden Test century.
"It's nice to get a few wickets, it was hard work out there," Bird, who brought an end to the Sri Lanka innings when he dismissed Suranga Lakmal for five, said.
"Jayawardene batted well and Thirimanne batted well but I thought we stuck at it well and got the wickets at key moments.
"We need a good start in the morning, it's a beautiful wicket to bat on and hopefully the boys can dig in for that first hour."
Brought in for his first Test since last April to replace the injured Kumar Sangakkara, Thirimanne had shown a fight that had largely been absent from the batting of his better-known compatriots on the tour.
The lefthander survived an lbw decision on his first ball courtesy of the television appeal and assumed the mantle from Jayawardene when his captain was dismissed after his first half century outside Sri Lanka for more than three years.
Thirimanne reached his second Test half century with a cover drive off Mitchell Johnson for three runs and, punishing any loose deliveries, smashed 13 fours and a six in his 151-ball knock.
The end to his innings came chasing another boundary off Lyon and it took an exceptional catch from David Warner at cover point to snare the miscued drive, leaving the batsmen bowed over his bat in despair.
"I'm really disappointed because it was a good opportunity for me after a long break from Test cricket," the 23-year-old said. "I thought I batted really well and I'm really happy with my performance."
Injuries had forced Jayawardene into making four changes to the side that was thrashed by an innings and 201 runs in Melbourne last week and he seemed determined to make up for that humiliation, on his own if necessary.
After a cautious start with his team on 26-1, the 35-year-old came out firing after lunch and smashed 13 boundaries in his 154-minute knock before Starc removed him with a fizzing ball that caught a thick edge and flew to Clarke in the slips.
There was a nervous wait for the raucous crowd basking in the sun at the Sydney Cricket Ground while a check was made for the no ball, but the television pictures confirmed that Starc's heel had grazed the white line.
"Today Mahela batted really well under pressure," said Thirimanne. "I think I saw Mahela play one of the best knocks in Test cricket."
Starc, rested for the Melbourne Test, also accounted for captain-elect Angelo Mathews (15) and returned to remove Dinesh Chandimal for 24 with a perfect yorker on the first delivery with the second new ball.
Bird had removed both Sri Lanka openers in the opening session, having Dimuth Karunaratne caught off a top edge for five and returning an hour later to dismiss Tillakaratne Dilshan, caught behind for 34.
The 26-year-old, who took four wickets in an impressive Test debut in Melbourne last week, also removed tailender Rangana Herath (five) before closing the Sri Lanka innings with his fourth victim.
Michael Hussey, playing in his final Test before retirement, got a huge cheer when bowled two overs before tea but he was unable to snare what would have been a popular wicket to add to his three catches in the field.
"I wouldn't be surprised if he came out and hit a hundred," said Bird. "He's a champion and it's sad to see him play his last Test match."
Former England captain Tony Greig, a popular media pundit in his adopted country who died last week, was remembered by the placing of a broad-brimmed hat on one set of stumps before the start of play.
- Sports & Recreation
- Mitchell Starc