The Ghana international and Algeria star Sofiane Feghouli were both on target as the Hammers picked a 2-1 away win at Burnley on Sunday.
Three points took Slaven Bilic's outfit to 11th on the table, a massive feat for a side that were caught up in relegation battle at a point.
“We are happy with today’s three points and to finish on a good note,” Ayew said.
“Overall, the season has been difficult, but we’re just a point away from eighth spot at the end of the day.
“We were quite disappointed because there were games where we definitely could have had more points.
“You take away from it that you need to win your points and take your chances and learn from this season now. We’ll learn, and prepare for the next one."
A £20.5 million signing from Swansea City in summer last year, Sunday's strike took the Black Star's season tally to six league goals.
“My goal for sure was right place, right time," Ayew said.
"I had a similar opportunity at Stoke and missed it, so I’m happy to score today and hopefully now it’s the end of the season that will set us up for next season.
“We are going to have holidays now and prepare for next season. I think this year, we have been unlucky with injuries and we didn’t start the season well.
"We had the Europa League also, and we didn’t manage to qualify, but after the start we had, we got to a point where we managed to turn things around, so it’s been a good end.”
In all, Ayew made 25 league appearances involving 16 starts for the Hammers.