Ozil scored his side's first goal, in the 58th minute, and set up Theo Walcott for the second.
The result lifted the Gunners above Manchester United into fifth place in the Premier League table -- four points adrift of the fourth and final Champions League spot held by Manchester City although the Gunners have a game in hand.
The result -- West Ham's fifth loss in a row -- also deepened the relegation fears circling Slaven Bilic's side as they are just five points clear of third from bottom Swansea who play them at the weekend.
Ozil scored his side's first goal, in the 58th minute, and set up Theo Walcott for the second, with substitute Olivier Giroud netting a clinching third late on.
"I feel he is back physically and with focus," Wenger said of Ozil, who had not scored since December 10.
"He had been hit hard by us going out of the Champions League and it took him some time to recover from that mentally.
"I feel for a few weeks now in training he is really focused again and that comes out in the game."
Wenger said he was positive about Arsenal's chances of making the top four, something he has achieved in all his 20 plus years at the club and a target he has set himself this time round while insisting it is not a condition of the board's towards signing a new contract.
"It's possible of course," the 67-year-old Frenchman said.
"We have players back from injury and we have done it before in more difficult conditions.
"It was a good result and a relief as well because we had gone through a bad period but the mentality of the team was healthy.
"We have scored over 100 goals this season already so going forward we were always good but defensively we were not good enough.
"I never questioned the mentality of the team, it was just that when you go through a difficult period the happiness and the confidence go quickly and come back slowly."
Bilic -- who has received the dreaded vote of confidence during a season in marked contrast to last one where they qualified for Europe -- called on his players to show courage and leadership.
"Of course we are in a relegation battle," Bilic said.
"We don't have to hide it. It's not being negative, it's being realistic.
"After five defeats you can't talk about great confidence. You need three points to get it back. Now is the time we need to show leadership, starting with me.
"I told the guys 'forget about this game - there is only one game now for us and that is against Swansea on Saturday'.
"I haven't lost my belief in them, they are good players."