The main objective of this study is to evaluate residual stresses in AISI 316L and 18Ni Maraging 300 functionally graded materials with continuous variation of composition within a single layer using the contour method. The manufacture of this kind of layer-level continuous functionally graded materials by employing a Powder Bed Fusion-Laser Beam system utilizing a blade/roller-based powder spreading technique has only been recently devised and a proper residual stress analysis is still required. In fact, as the mechanical properties of additively manufactured samples are significantly influenced by the direction of construction, the same holds true for the direction along which the compositional variation is made. Furthermore, in this study, the impact of solution annealing and aging heat treatment, which are necessary for enhancing the mechanical properties of martensitic steel, on residual stresses was explored. Additionally, the effect of adopting material-differentiated process parameters was investigated. The results indicated that each specimen displayed areas of tensile stress concentration on the upper and lower surfaces, balanced by compression in the center. The application of heat treatment led to a decrease in the maximum tensile stress of 8% and provided a uniform and significant stress reduction within the maraging steel. Finally, the implementation of material-specific process parameters for the three composition zones in conjunction with the heat treatment resulted in a reduction in the maximum residual stress of 35% and also a significantly lower residual stress field throughout the specimen.