Stokes, 29, scored twice and set up one for Simon Murray as Hibs reached the League Cup quarter-finals.
“He was fantastic – far better than what I expected,” said boss Lennon.
“When you consider that’s his first 90 minutes in over a year, I’ve got to be delighted with his contribution and I’m sure he is as well.”
“Just his vision and his touch,” Lennon said of Stokes. “There are things he tries at times that don’t come off but he sees things and his game intelligence was excellent tonight.
“Simon (Murray) is in a good place. He’s scoring a lot of goals; good goals, box goals and Stokesy will provide a lot of that for him as the season goes on.
“The two of them scored and both set each other up for goals so I’ve got to be pleased with that, considering they haven’t had much time on the training ground together.
“I’ve got other attacking options in [Martin] Boyle, the two Lithuanians [Vykintas Slivka and Deivydas Matulevicius] looked very good when they came on as well, [Danny] Swanson, [Dylan] McGeouch and [Fraser] Murray so going forward we look pretty strong at the minute.
“You’ve got to earn the right to play. Otherwise, it could be a long night.
“To be fair to the players, they showed the right attitude and in the end had real good quality about them as well.”
Hibs, whose other goals against Ayr came from Efe Ambrose and Deivydas Matulevicius, face Rangers at Ibrox on Saturday, by which time Pedro Caixinha’s side will have played Dunfermline Athletic in Wednesday’s League Cup second-round tie.
“We have to be strong, we have to be resolute at times,” Lennon said. “They had a great win at the weekend [by beating Motherwell in the league]. We’ll see what tomorrow brings for them – it’s always a difficult fixture but we go into it in good form and we’ll see what it brings.”
Ian McCall, whose Ayr side reached the second round by winning their group in the first round, said the match at Easter Road was “a game too far” for the Honest Men.
“Hibs deserved to win, I don’t think there’s any doubt about that, but certainly in spells in the game going forward we were excellent,” he said. “We certainly deserved a couple of goals for our play.
“We’re gutted that we lost three goals from set plays. Three of their goals were very, very cheap.
“It was game too far for us. We’ve got a very, very small squad.
“We need to go back to playing Saturday and Saturday because we can’t handle the midweeks.”