The spinner claimed two wickets as the tourists finished the day 214-4 in their second innings after England were bowled out for 365 in the morning.
The 27-year-old told Sky Sports News: "It was nice to contribute to the side, to bring us back into the game because Sri Lanka were playing really well at the time and to do it in that way was great.
"I was just trying to bowl as straight as I could to [Kumar] Sangakkara, bowl a dot ball really. He's taken me down a couple of times already but I was just trying to do a job for the team and thankfully it came off.
"I've spoken to [former England spinner Graeme Swann] here and there and he tries to give me lots of confidence. He's told me to just enjoy it and enjoy playing for England all the time."
Sri Lanka lead by 106 heading into the fourth day of the match.