We present a theory and Monte Carlo simulations of adsorbed particles on a corrugated substrate. We have focused on the case of rare gases and light molecules, H-2 and D2, adsorbed on graphite. The competition between the particle-particle and particle-substrate interactions gives rise to frustration phenomena. From our model predictions for the epitaxial rotation angle of the adsorbed phases are determined. Our results extend and unify previously known descriptions. We have studied as a function of temperature and coverage the phase diagrams, especially the intermediate phases appearing between the commensurate and incommensurate phase for the adsorbed systems. From our simulations and our theory, we are, able to understand the gamma phase of D2 as an ordered phase stabilized by disorder. It can be described as a 2q-modulated structure. In agreement with the experiments, we have also found a modulated 4 x 4 structure. Energy, structure-factor intensities, peak positions, and epitaxial rotation angles as a function of temperature and coverage have been determined from the simulations. Good agreement with theory and experimental data is found.