We report the results of multimillion-atom parallel molecular dynamics simulations performed to investigate the lattice-misfit-induced stress relaxation in nanometer-sized rectangular GaAs mesas covered with InAs overlayers of 12-ML thickness. The morphology of atomic planes in the InAs overlayers and the stress distributions in the mesas are studied for varied linear dimensions and aspect ratios. We find that the lattice-mismatch-induced stress relaxation pathways is strongly dependent on the mesa and InAs overlayer geometry. The lattice-misfit-associated stress is accommodated through both the morphology changes of the InAs overlayer planes and the stress accommodation in the GaAs mesa interior. The effects are quantified by computing the atomic displacements in the InAs overlayer atomic planes and the hydrostatic stress distributions. Simulation results reveal that, as the aspect ratio of the rectangular mesa top increases, the morphology of the atomic planes shows a transition from dimple-type morphology, characteristic for mesas of square geometry, to semiperiodic modulations of displacement fields accompanied by the overall downward relaxation. The conclusions regarding the stress relaxation mechanism are supported by comparing the topography of the displacement field patterns with those of the hydrostatic stress observed in the mesa systems of different geometries. The obtained results are in qualitative agreement with experiments.