Triply periodic minimal surfaces (TPMS) inspired by nature serve as a foundation for developing novel nanomaterials, such as templated silicas, graphene sponges, and schwarzites, with customizable optical, poroelastic, adsorptive, catalytic, and other properties. Computer simulations of reactions on TPMS using reactive intermolecular potentials hold great promise for constructing and screening potential TPMS with the desired properties. Here, we developed an off-lattice, surface-constrained Metropolis Monte Carlo (SC-MMC) algorithm that utilized a temperature quench process. The presented SC-MMC algorithm was used to investigate the process of graphitization reactions on the Schwarz primitive, Schwarz diamond, and Schoen gyroid TPMS, all with a cubic lattice parameter of 8 nm. We show that the optimized carbon TPMS exhibits a low energy, approximately -7.1 eV/atom, comparable to that of graphite and diamond crystals, along with a variety of topological defects. Furthermore, these structures showcase extensive and smooth surfaces characterized by a negative discrete Gaussian curvature, a distinctive feature indicative of an interconnected morphology. They possess specific surface areas of ∼2700 m2/g, comparable to graphene, and exhibit a significant porosity of around 90%. The theoretical X-ray correlation functions and nitrogen adsorption isotherms confirm that the constructed TPMS exhibit remarkably similar surface properties, although the pore space topology varies significantly.