"Scoring the penalty would have killed the game but if you lose goals to set pieces you are not at your best."
United had demolished Sunderland 4-0 on Boxing Day but failed to rise to similar heights against Alan Curbishley's side.
Ferguson added: "It's difficult to say why but they are human beings and you can't expect them to be perfect all the time.
"We put in an excellent performance at Sunderland on Boxing Day but this was disappointing. They struggled today, our team. They were very competitive and aggressive, West Ham, and were always about us.
"They were very motivated and it was probably their biggest game of the season."
It was the third time in a row that United had been beaten by West Ham following home and away 1-0 successes last term.
Ferguson added: "Sometimes it goes in little cycles like that but we can't complain."
Curbishley was delighted with the win especially as he had a number of players out injured and lost two more, Scott Parker and Nolberto Solano, during the game.
He said: "If you walk along the corridor here there are pictures of all the players on the walls and I reckon I had a whole wall out injured.
"We played ever so well in the first half and were disappointed to be one down. Hayden Mullins hit the bar and it came back to Mark Noble and if we had nicked our goal who knows what would have happened.
"It is a fantastic result considering I had 16 fit players and lost another two."
Curbishley admitted he had been relieved to see Ronaldo miss the penalty, which had been conceded by ex-United defender Jonathan Spector.
He said: "That's the first time I have seen Ronaldo hit a penalty hard. I was surprised when he missed it."
The game also marked the return to Upton Park of Carlos Tevez, who had joined United after securing top-flight football for the Hammers with a winner at Old Trafford on the final day of last season.
Curbishley added: "We kept him quiet."