Fulfilling maternal nutrition is an NP-hard problem. Optimization techniques are required to solve its complexity. This issue is crucial as it affects the number of stunted toddlers in Indonesia. Stunting begins in the womb due to inadequate maternal nutrition during pregnancy. Genetic Algorithm (GA) and Particle Swarm Optimization (PSO) are optimization methods applied to NP-hard problems, including medicine. Their performance has not been compared in this field. This study aims to identify an alternative method for recommending daily menus based on maternal nutritional needs. There are 55 food ingredients used to fulfill five menu parts: staple food (SF), vegetables (VG), plant source food (PS), animal source food (AS), and complementary (CP). Nutritional adequacy for prenatal is determined by Total Energy Expenditure (TEE) based on basal energy, daily activity, and stress levels. Results show PSO outperforms GA in average fitness values, 30.45 to 102.51, while GA excels in execution time, 0.33 to 23.22 seconds. PSO is preferred for effectiveness, and GA for efficiency, but given the problem's urgency, PSO is recommended. Exploring other metaheuristic methods is advised to enhance menu recommendation solutions for maternal nutrition. Additionally, expanding the food database is necessary for more varied maternal menu to support stunting prevention.