Cavani made his first Premier League start against in-form West Ham on Saturday evening but struggled to make much of an impact before he was subbed off at half-time.
Manchester United trailed 1-0 at the break after Tomas Soucek gave West Ham a deserved lead, but the visitors scored three goals in 13 second-half minutes to complete a comeback victory.
Paul Pogba equalised for the Red Devils, before Mason Greenwood gave Solskjaer’s side the lead. Marcus Rashford – who replaced Cavani at half-time – then added a third after a through ball from fellow substitute Juan Mata.
Explaining why Cavani made way at the break, Solskjaer said: ‘It’s unfortunate that you get muscle injuries and Edi had to come off with an injury. Hopefully it’s not too bad.’
On the impact of his substitutes, Solskjaer added: ‘You have a duty to be ready when you are called upon.
‘Bruno [Fernandes] and Marcus [Rashford] came on and did well. First half we had loads of possession but we didn’t go anywhere with the ball.
‘Second half we stretched them more and ran in behind. The quality was much better, The goals were exceptional.
‘Mason [Greenwood] is a great finisher. We are just waiting for his season to get started. He is getting fitter.
‘The first goal as well was top quality from Paul Pogba. Concentration, head and knee over the ball. I am so happy for him.’
Manchester United’s victory over West Ham sees them climb to fourth in the Premier League, two points behind joint-leaders Tottenham and Liverpool.