The Black Cats took the lead when Sebastian Larsson scored his first Premier League goal of the season with a sublime long-range strike in the 12th minute.
Adam Johnson doubled Sunderland’s lead just after the interval before James McClean secured three points with a close-range finish with 17 minutes remaining.
“It baffles me trying to understand what I was seeing today,” Allardyce told BBC Sport.
“We gave Sunderland their easiest win of the season; I’ll have to get to the bottom of it tomorrow.
“I don’t know how the same players that took Manchester United to the wire last week can follow it up with a performance like that.
“The whole team hasn’t performed. The lack of goals is a concern.”
Sunderland manager O’Neill praised his side for a dominant performance, with the Black Cats moving six points clear of the relegation zone.
“We were brilliant from start to finish,” O’Neill said.
“It was very important for us today. We were energised after having a couple days off after the Bolton game.
“We put West Ham on the back foot from the beginning, and a great goal from Seb [Larsson] settled us down.”
MORE: Man United latest news
MORE: Arsenal latest news
MORE: Chelsea latest news
MORE: Liverpool latest news