Scorecard: Sri Lanka v South Africa
Chasing 308 for victory, the visitors fell well short after a promising start by openers Hashim Amla and Quinton de Kock and some stubborn resistance by captain AB de Villiers in the middle of the innings.
"We just could not get any momentum going," he said.
"But we will keep learning.
"The series was a great experience.
"We played some quality spin against a sub-continent team that knew their conditions really well."
De Kock and Amla got the run chase off to a respectable start before De Kock was bowled by Sachithra Senanayake for 27 after an opening stand of 35.
Amla was next to go as Senanayake traped him leg before for 18.
JP Duminy's quickly compiled 15 runs but would also succumb to the low-bouncing Premadasa pitch as Tillekaratne Dilshan got one to skid through, striking Duminy on the pads giving the umpire an easy decision and send him back to the pavilion.
Faf du Plessis didn't last long either as he edged a Thisara Perera delivery through to Kumar Sangakkara after only scoring 6.
Farhaan Behardien gifted his wicket for 1, trying to slog Suranga Lakmal across the line, only to find Angelo Mathews at mid-off, who made no mistake with the catch.
The now-customary Proteas collapse was in full swing when David Miller edged Lakmal behind to Sangakkara without scoring to leave the Proteas reeling at 85-6 after the first 20 overs.
Ryan McLaren would join De Villiers at the crease with the two sharing 52-run partnership as the captain reached 51, only to throw his wicket away trying to go for one too many, trying to heave a Mendis delivery onto the off side only to find Mathews, who took yet another catch to remove his South African counterpart.
From there on in, the Proteas continued to lose wickets as Mendis removed Morné Morkel before ending McLaren's stubborn stay at the crease for 29 a few overs later.
Lakmal wrapped up the match in fitting fashion as he bowled Lonwabo Tsotsobe for 3 as the Proteas were bowled out for 179 with just over six overs remaining.
Earlier Sri Lanka who won the toss and elected to bat, posted 307-4 in their innings thanks again to eventual man-of-the-match Dilshan and man-of-the-series Sangakkara, with Lahiru Thirimanne also pitching in with a handy knock.
Dilshan shone for the host and narrowly missed out on his second successive century by one run.
The aggressive opener, who hit an unbeaten 115 in the fourth game in Pallekele on Sunday, plundered 13 boundaries before he was bowled for 99 by Ryan McLaren in the 39th over.
"I am a bit disappointed at missing my century, but these things happen in cricket," said Dilshan.
"But I think McLaren bowled that over very well.
"I am really enjoying my cricket these days.
"When I get a start, I want to make it count.
"This has been a good series for me. I have batted, bowled and fielded well."
Thirimanne, promoted to number three, scored 68 with Sangakkara ending unbeaten on 75 off 45 balls.
Sangakkara hit 12 fours, helping the hosts take 52 runs from the final five overs as the South African bowlers wilted in steamy conditions.
Left-handed Thirimanne and Dilshan put on 163 for the second wicket after Kusal Perera was caught behind off Morné Morkel in the fifth over.
Perera was one of the four changes made by the hosts, who have already taken an unassailable 3-1 lead in the series.
Sri Lanka rested Mahela Jayawardene, Lasith Malinga, Upul Tharanga and Rangana Herath, replacing them with seamer Lakmal, spinner Senanayake and batsmen Angelo Perera and Kusal Perera.
The tourists recalled McLaren and spinner Aaron Phangiso in place of Rory Kleinveldt and Robin Peterson.
The two teams will now contest a three-match T20 series starting in Colombo on Friday.
Kusal Perera, Tillakaratne Dilshan, Kumar Sangakkara (wicketkeeper), Lahiru Thirimanne, Dinesh Chandimal, Angelo Mathews (captain), Angelo Perera, Thisara Perera, Sachithra Senanayake, Suranga Lakmal, Ajantha Mendis
Hashim Amla, Quinton de Kock (wicketkeeper), JP Duminy, AB de Villiers (captain), Faf du Plessis, David Miller, Farhaan Behardien, Ryan McLaren, Aaron Phangiso, Morne Morkel, Lonwabo Tsotsobe
Umpires: Richard Kettleborough (ENG) and Raveendra Wimalasiri (SRI)
TV umpire: Ranmore Martinesz (SRI)
Match referee: Andy Pycroft (ZIM)