Prior to today, the Hammers had failed to win in their last four Premier League matches and had slipped to within five points of the bottom three.
However, a 77th-minute Andy Carroll header earned them victory over the Welsh outfit this afternoon that Allardyce describes as "a massive relief".
He said: "I was wondering what the lads had to do to score a goal. Their keeper was up to it - that was their number two.
"We had a lot of balls flashing across the goal and over the bar. The defending side of our game, had been our weaker points, but we were very good.
"Swansea hardly created anything except in last couple of minutes. It's a massive relief for us."
West Ham return to Premier League action when they travel to Aston Villa next Sunday.