Sebastian Larsson got them off to a perfect start with a superb 12th-minute opener, before second-half strikes from Adam Johnson and James McClean sealed a comfortable victory.
Martin O’Neill’s side were the better team throughout and are now six points clear of the relegation zone.
West Ham, meanwhile, failed once again to record back-to-back league wins after a poor performance both in defence and up front.
Sunderland raced out of the blocks and could have gone ahead within three minutes when David Vaughan sent a drilled left-footed shot narrowly wide from the edge of the box.
They continued to push forward both at pace and in numbers, and Steven Fletcher was the next to threaten with a goal-bound right-footed effort that was deflected just wide.
West Ham were being overrun and the pressure finally told after the ball was half-cleared to Larsson 25 yards out. The Swede took two touches to shift the ball on to his left foot and then let fly a brilliant shot that rocketed past the helpless Jussi Jaaskelainen and into the roof of the net.
The hosts then strangely let their tempo drop and allowed West Ham to create their first chance of the game through Matt Jarvis’ low drive, but the visitors were disjointed throughout the opening period and rarely troubled Simon Mignolet in the Sunderland goal.
West Ham manager Sam Allardyce sent on Ricardo Vaz Te at the break as he looked to mount a fightback, but his side gave a second goal away within two minutes of the restart.
Stephane Sessegnon squared to McClean in acres of space on the left and after his low shot was saved by Jaaskelainen, 18-year-old defender Dan Potts failed to clear, allowing Johnson to hook home.
The visitors continued to press forward in a valiant bid to get back into the game, while Sunderland were content to play on the counter-attack.
And the tactic worked perfectly for the hosts, when Johnson broke down the right and fed Sessegnon, whose miscued shot fell perfectly for McClean to sidefoot home from an angle.