This third Premiership victory in four games for Hammers was secured with a goal in each half by Jermain Defoe and the returning Fredi Kanoute, who replaced Les Ferdinand at half-time.
A third consecutive clean sheet and a win that lifts Glenn Roeder's side out of the bottom three for the first time since November, although Bolton Wanderers will reclaim 17th place if they beat Spurs at home on Monday night.
In a first half that produced precious little quality play from either side, West Ham scored the all-important first goal after 24 minutes. Ferdinand, selected even though Kanoute had completed a three-match ban after being sent off at Leeds more than a month ago, justified his place by leaping high above two Sunderland defenders to direct a long, diagonal ball into the path of his young strike partner. Defoe, with his back to goal, turned his marker and hooked the ball over keeper Thomas Sorensen from 10 yards out at the Centenary Stand end.
Strangely, Hammers took some time to build on their lead and it was the visitors, playing for the second time under new manager Mick McCarthy, who retained possession for longer periods, albeit without producing much of a goal threat. Tore Andre Flo headed a Kevin Phillips cross from the left onto the roof of the net but David James didn't have to make a save before the interval.
When Kanoute joined the fray after Ferdinand withdrew due to a shin injury, Hammers had to adapt their style - and the game improved considerably as a spectacle. Instead of the back four and midfielders looking to find the powerful Ferdinand with long, high balls - a simple route that led to the opening goal, it has to be said - there was more thought and finesse to their method after the break.
Kanoute stood out not just for his new white boots, but also for those trademark driving, pacy runs down the flanks that produced two superb crosses that team-mates were unable to meet.
The Frenchman looked as sharp and lively as the impressive Defoe, who was unfortunate not to go on and complete a hat-trick. Twice he wriggled past a pack of red-and-white striped defenders and Sorensen, only to see one enticing low cross roll agonisingly across the face of goal, while his second run and dribble ended in his shot being deflected inches over the bar.
Apart from a looping shot from Thomas Butler that he held at full stretch, James remained untroubled at the other end as West Ham grew in confidence and tightened their grip on the game. They still needed a second goal to push the Black Cats nearer the relegation trap door, though, and the Wearsiders all but disappeared through it when Kanoute made it 2-0 in the 67th minute.
Racing on to Michael Carrick's measured, low through-ball, Kanoute sped clear of his marker to calmly sidefoot the ball low to Sorensen's left from 12 yards.
Within two minutes, Defoe twice went close again - firstly, after more fine approach work by Kanoute, who cut in from the right, and then with a far-post header that Sorensen just managed to palm clear of the goalline.
There was no hint of a Sunderland fightback but that still didn't stop Roeder blowing a fuse on the touchline when his players - visibly growing in confidence - began to over-indulge in their showboating. Joe Cole enjoyed himself most of all with a few party tricks but the manager withdrew his England midfielder after one entertaining spell of flicks and tricks ended with the otherwise flawless Tomas Repka almost conceding a silly goal with an underhit backpass that James just managed to scramble clear 10 minutes from time.
It's extraordinary for any side in a relegation battle to be toying with their opponents, even less so given Hammers' need to further improve their goal difference, which is still five goals worse than Bolton's and may ultimately prove decisive.
There was no spat or tantrum on this occasion, though, from this West Ham captain. Roeder put a paternal arm around Cole as he reached the touchline and the standing ovation he received from the crowd showed how much they approved of his flair before he made way for the much less flamboyant Edouard Cisse.
Roeder said: "I'm very pleased with the performance and the result and we just need to keep this run going. We've kept working hard on the training ground and the confidence and belief is just flowing at the moment.
"The part Les played in the first goal showed the value of having a big, physical striker. He and young Jermain work so well together and spend time together at training working on their finishing. They both work so well when they haven't got the ball, too.
"Jermain is learning so much from Les and he's kicking himself in the dressing room now that he's not going home with the matchball.
"There's no automatic selection policy now and it's been a long time since I've had the luxury of being able to bring on someone like Fredi Kanoute as a sub. He took his goal very well but everyone will have to work hard to take the shirts from those who have got them now.
"Les' shin will be okay for him to play at Southampton in two weeks and I don't see it as a selection problem."
Roeder also praised his two full-backs, Glen Johnson and Rufus Brevett. "Their performances have taken the pressure off the two central defenders," he added. "It's a happy dressing room now and we're looking forward to going to Southampton."
Minute-by-minute:
6 - After a bright start, Hammers come close to taking an early lead, when Sinclair's deep cross is poked back into the danger area by Lomas, but Sorensen dives bravely at the feet of Ferdinand to deny the striker.
15 - After Johnson is fouled on the edge of the penalty area, Defoe curls the free-kick high and wide.
22 - Sunderland's first attack of the game ends with an unmarked Flo heading Phillips' cross just over the bar from eight yards out.
23 - GOAL! Hammers make the breakthrough they have been threatening, as a long ball forward from the right is flicked on by Ferdinand for Defoe, who controls with his back to goal 10 yards out before twisting superbly and clipping the ball past Sorensen. West Ham United 1 Sunderland 0.
38 - Cole's quick touch takes him away from Thornton and towards goal, but the captain drags his low shot wide of the target.
Added time: 1 minute.
Half-time: West Ham United 1 Sunderland 0.
Second half:
46 - Substitution for West Ham, Kanoute replaces Ferdinand.
46 - Lomas goes close in the first minute of the half, sending a low left foot shot just wide.
48 - Defoe goes even closer, collecting a pass from Sinclair and turning in the box before curling a right foot shot just wide of the far post.
53 - Cole's searching pass with the outside of his boot splits the Sunderland defence and releases Kanoute, who fires his shot into the side-netting.
57 - Johnson booked for foul on McCartney.
58 - Substitution for Sunderland, Kyle replaces Flo.
59 - Butler almost catches James out with a hooked shot from the edge of the area, but the Hammers keeper reacts quickly to make an easy save.
61 - As Sunderland fail to clear, Carrick's toe-poke releases Defoe, who bursts past a defender and then skips round Sorensen but can only drag the ball across goal from an acute angle.
64 - Another close shave in the Sunderland box, as Cole's cross is taken off the head of Kanoute by Sorensen, Lomas sees his follow-up shot blocked, and Johnson is then denied by a last-ditch tackle.
66 - Substitution for Sunderland, Proctor replaces McCartney.
67 - GOAL! Hammers secure a precious second, as Fredi Kanoute comes back with a bang. Carrick robs Kilbane in midfield and lays on an inch-perfect pass that the Frenchman collects in his stride before firing confidently past Sorensen. West Ham United 2 Sunderland 0.
69 - Almost an instant third, as Kanoute brilliantly controls a long ball and finds Defoe, who checks inside a defender and then rounds Sorensen but sees his low shot somehow cleared off the line and over the bar by a retreating defender. From Carrick's resulting corner, Sinclair's flick-on reaches Defoe again at the far post, but this time Sorensen denies the youngster.
82 - Substitution for Sunderland, Stewart replaces Butler.
86 - Substitution for West Ham, Cisse replaces Cole.
88 - Substitution for West Ham, Hutchison replaces Lomas.
Added time: 2 minutes.
Full-time: West Ham United 2 Sunderland 0.