West Ham had an early chance when Matthew Etherington broke through, but, with Bobby Zamora in the clear to his right, Matthew elected to take on one Stoke defender too many.
Marlon Harewood then felt he was fouled as he lined up a shot - he had to content himself with a corner - before he struck a couple of daisy-cutters wide.
Bobby Zamora then stroked a right foot effort wide, before Rufus Brevett saw a 30 yard strike deflected for a corner.
Hayden Mullins then hit a searing shot from outside the box that was brilliantly parried, but the deadlock was broken soon after.
Etherington played a short pass to Harewood, who, with his back to goal, spun on a sixpence to drill the ball past a motionless Ed de Goey.
At the other end, only Marcus Hall had a meaningful shot in the first half - which Steve Bywater was equal to.
Teddy Sheringham replaced Matthew Etherington three minutes into the second half, with Luke Chadwick going to the left and Marlon Harewood switching to right wing.
The substitution didn't take long to pay off - Sheringham's cheeky back heel from an off target Harewood shot squeezing home at de Goey's near post.
Bobby Zamora supplied the initial cross which Stoke failed to deal with - and it meant that the Hammers had scored twice at home for the first time in the league this season.
Carl Fletcher then replaced Luke Chadwick with Nigel Reo-Coker switching to the left, and shortly after that Sergei Rebrov came on for Zamora - with Harwewood reverting to a position up front while the Ukranian played on the right.
Rufus Brevett replaced the injured Chris Powell at left back, fit-again Matthew Etherington came back in place of Sergei Rebrov, and Malky Mackay came in at centre half with Anton Ferdinand dropping to a bench which included Teddy Sheringham, who missed out with a thigh strain on Saturday; Don Hutchison made way for him.
TEAM: Bywater, Repka, Brevett, Harewood, Lomas, Etherington [Sheringham], Mullins, Reo-Coker, Mackay, Zamora [Rebrov], Chadwick [Fletcher].
Subs unused: Walker, Ferdinand.
Attendance: 29,808