Nocturia, marked by frequent nighttime urination, significantly impacts quality of life. This study explores the association of METS-IR (Metabolic Score for Insulin Resistance) and ABSI (A Body Shape Index) with nocturia, using data from the National Health and Nutrition Examination Survey (NHANES). A cross-sectional analysis of NHANES data from 2005 to 2020 was performed. Multivariable logistic regression assessed the associations between METS-IR, ABSI, and nocturia, adjusting for demographic characteristics, chronic diseases, and lifestyle factors. Generalized additive models and smoothing splines were used to describe relationship dynamics. Among the 16,450 participants, both METS-IR (OR = 1.15, 95% CI: 1.11-1.20, p < 0.0001) and ABSI (OR = 1.14, 95% CI: 1.10-1.19, p < 0.0001) were significantly associated with nocturia based on z-scores. An incremental rise in the quartiles of METS-IR and ABSI was associated with a higher risk of nocturia. Specifically, compared to the lowest quartile (Q1), participants in the highest quartile (Q4) had an OR of 1.45 (95% CI: 1.30-1.61, p < 0.0001) for METS-IR and 1.38 (95% CI: 1.23-1.55, p < 0.0001) for ABSI. Subgroup analyses showed a stronger association between ABSI and nocturia among individuals living alone and those aged 20-38 years. Nonlinear modeling indicated a threshold effect for ABSI, with nocturia risk significantly increasing when ABSI exceeded 76.2. Higher METS-IR and ABSI indices are closely linked to a greater prevalence of nocturia, indicating that these indices can be valuable in clinical assessments for evaluating nocturia risk and supporting preventive strategies.