Stephan El Shaarawy struck the only goal in the 1-0 win.
"It was a deserved victory and I think so far the criticism has been harsh considering what the lads did on the field," said the Coach.
"We could've scored in the first half and there were several dubious penalty incidents. We also made a lot of mistakes in our passing, which also happened in Malaga.
"We got this result in a difficult atmosphere and I am glad the players reacted to it. I am happy with the win."
It had been reported Allegri was facing the axe if he failed to win this evening.
"I was very relaxed because the team had always put in strong performances. We just needed to find some belief and confidence, especially in front of goal. With goals everything becomes easier. I experienced a similar situation when I was at Cagliari."