Substitute Romelu Lukaku returned from a month-long absence to score the only goal nine minutes from time.
Up to that point the Toffees, who have been beaten just once in 22 league matches at home, had created little in the way of genuine chances.
But they kept to the principles instilled in them by manager Roberto Martinez and the winner came from a good move down their left.
"We need to learn to get better at being patient at home," said the Scotland international.
"It is about controlling the game and not feeling you need to go more direct and we showed that.
"As long as you get the goal that puts you in front you are going to be happy.
"We worked hard, kept plugging away and had a few chances but as the game went on the chances became more frequent and big Rom stuck one away.
"It is about being patient and waiting for the right opportunity because you can snatch at shots as the clock ticks down.
"This is just another example that it does work. If you play the game in the right manner the chances will come along.
"We had a couple of disappointing away results (at Tottenham and Chelsea) after good performances so it was always important to win yesterday.
"It was big and we knew that coming into the game."
The win moved Everton to within nine points of fourth-placed Manchester City, who have a match in hand.
Martinez has still not ruled out the prospect of Champions League football, although three defeats and a draw in their previous five league matches did much damage in allowing their top-four rivals to open up a significant gap.
"We want to win every game. If we can win every game, why not?" said the Toffees boss on qualifying for the Champions League.
"There are 33 points to play for. In football it is not that straightforward.
"This league has many twists and turns. All we want is to be as good as we can."
With Lukaku and Gerard Deulofeu both returning to fitness Everton just need captain Phil Jagielka to recover from a hamstring injury and they should have their strongest squad - long-term injuries to Arouna Kone, Darron Gibson and Bryan Oviedo and the uncertainty over loan signing Lacina Traore's own hamstring problem notwithstanding - available for the remainder of the campaign.
The bench against West Ham had Lukaku, Deulofeu, Ross Barkley and Aiden McGeady on it, giving Martinez a number of attacking options.
Lukaku's introduction and subsequent match-turning contribution shows what can be done when the manager uses such positive alternatives.
"Throughout the season, with the subs as well, the manager has shown he will go for it and Romelu gave us more presence in the box," said Naismith.
"He is a big player and his goals have been vital for this season.
"It is good to see and shows the strength in numbers we have got here.
"Gerard is back in after a long time out, Aiden has joined in January so there is a very healthy competition for places and that can only benefit us going to the end of the season.
"We have just got to go into each game and get the points and when it comes down to the last five or six games we'll have a look if we are there or thereabouts.
"It was important we just keep ticking along and getting the wins."
West Ham boss Sam Allardyce put the ending of his side's four-match winning streak down to failings in attack.
"We won the last four games by two clear goals because our final-third play was so much better," he said.
"When we got down there we just didn't find the right ball sadly."