Because of the gradient distribution of arsenic through the thickness of an InP layer, stress gradient in the structural layer of an InP-based Fabry–Perot (FP) cavity structure could be introduced during the fabrication process. This stress gradient, usually tensile at the upper surface and compressive at the lower surface, could induce a significant out-of-plane deformation, which may eventually affect its optical performance. White-light vertical scanning interferometry is employed to measure the stress-induced deflection of InP-based cantilever and membrane components used in a FP cavity structure. Deformation patterns caused by stress gradient in various cantilever and membrane structures with different configurations and geometries are investigated through experiments and simulations. The results indicate that the stress gradient induced during the fabrication process results in varying degrees of the FP structural deformation, which is further influenced by the configurations and geometries of the structural membranes and supporting beams. Four types of membrane structures of a FP cavity device are studied, and the results are compared to that obtained using a finite element analysis.