The Black Cats went ahead after 12 minutes when Sebastian Larsson smashed home a left-foot piledriver, his first goal of the season, and they never looked back as the Hammers succumbed with barely a whimper.
Adam Johnson doubled their advantage within two minutes of the restart when he cashed in on Dan Potts' error and James McClean made sure of the points with a third 16 minutes from time after Stephane Sessegnon, not for the first time, had terrorised the visitors' defence.
O'Neill said: "There's always pressure. The win was important for us. I think anybody in the bottom half of the table still has to be looking anxiously over their shoulder.
"But it was an important win for us - I think it's our fourth in seven games in the Premier League and in the context of things, it was good to win."
Meanwhile, O'Neill confirmed Senegal international defender Kader Mangane is heading for Wearside in the hope of clinching a loan deal until the end of the season.
He said: "I'm hoping he's making his way over at this minute. I'm not sure anything has been absolutely and utterly completed but it would be a loan until the end of the season.
"Of course, we have a number of positions we would like to try to fill between now and the end of January and I'm hoping something might materialise.
"But there's a long bit of distance to go yet."
- Sports & Recreation
- Sebastian Larsson