Yes, your Caterpillar is fine.
Caterpillar skin has only a limited elasticity, so Caterpillars
change their skin several times during their lives,
as they grow through their instars stages.
In order to break through the old skin, some arch their backs.
For a few days before and after,
they often appear to feel very uncomfortable.
However, the discomfort seems to pass quickly,
and they soon begin feeding again.