O'Sullivan felt his players coped well in unfamiliar conditions to get their tour off to a winning start.
The Irish outscored their hosts by six tries to two with Guy Easterby and John Kelly each crossing twice.
"I'm happy with the result," said O'Sullivan. "Six tries to two is a good result whatever way you look at it.
"We didn't start particularly well and we were playing into a strong wind and we needed to control the ball and we didn't.
"Then we were 11-0 down and it was looking like an uphill battle but to be fair to the lads they tried their guts out in very difficult conditions.
"The pitch was very very hard and the heat got to us a bit, plus the Tongans were a very physical side.
"We really worked hard and we got the ship back on track just before half-time and second half we could have been more clinical at times but at the end of the day we still scored four more tries than them.
"It was an untidy performance at times, but in the conditions that was to be expected."
The game was marred by the sending off of Tonga's Viliami Ma'asi after 58 minutes for stamping on the head of Eric Miller.
Miller was badly injured in the incident and O'Sullivan must now consider whether to cite or not, even though the real culprit may have been Heamani Lavaka.
"It seems like Eric had his face stamped on, it was definitely a red card," O'Sullivan said.
"He's got a broken nose, he's got stitches in his nose and his eyelid is split.
"I'm going to see the match commissioner now and we'll make a decision after that. It's a pity it happened.
"The game was played in a pretty sporting way and there was really no incidents to talk about."
O'Sullivan believes his side will learn from the match and added: "They had quite a bit of ball and they made us work hard in defence and the two tries they got, one was an intercept from 80 metres and the other we were just a bit sloppy defending off a scrum.
"It was the kind of game that if we didn't keep our focus and didn't keep playing it would have slipped away from us. "But 40 points, tries, I'll take that in these conditions."