Above a certain critical thickness, the more stable morphology of a highly strained In(x)Ga1-xAs layer on GaAs(001) is an islanded configuration. The strain relaxation occurs mainly at the free-edges of islands and thus increases when the epilayer evolves from a two-dimensional (2D) to a three-dimensional (3D) morphology. A simple model taking into account this relaxation process as well as surface energy creation correctly predicts the critical thickness for which the 2D-3D growth mode transition is observed under usual growth conditions for this prototypical highly-mismatched system.