Mexes scored an incredible over-head kick from outside the penalty area, reminiscent of Zlatan Ibrahimovic's goal against England in a recent friendly.
Allegri said: "I saw this extraordinary goal and the ball looping into the air. At the time I didn't believe he'd scored, as it seemed impossible that would go in! He has pain in his knee and went off, so we'll see what the tests say.
"Especially after going 2-0 up, we wasted some chances to add a third and almost ground to a halt out of fear of failing to take home the result. That can happen with a squad that is so young and lacking in European experience."