The Hammers won via goals from Michail Antonio, Mohammed Kudus, Jarrod Bowen and Lucas Paqueta. Liam Delap struck for Ipswich.
Lopetegui said: "It is always important to win at home.
"I’m happy for the fans and the players too because they deserve this. It was a hard match, as all the matches in the Premier League are, but we did very well.
"We started very well, but suffered a very early equalising goal. I think after that we had a very good mentality, we kept strong and we deserved to score before we did get the second.
"In the last chance of the half we did score, and we kept going in the second half. We kept looking for goals and in the end we achieved a good victory.
"It is always a good moment to score a goal!
"But it’s true that we deserved to score before we did, in the last action of the first half. We then got another at the start of the second half and it was important to score at both of those times.
"I would like to highlight the defensive work we did, too.
"Against this kind of team, the key thing is that we defend very well and we don’t allow them to play us in their style. I think that was important.
"Jean-Clair Todibo did well and we are happy for him.
"There is good competition between him, Max (Kilman) and Dinos (Mavropanos). They are always ready and push one another on, so this is good.
"It was important to go into the international break with this victory and a good feeling.
"We have the break, but we are going to start thinking about the next matches very quickly for sure."