Triglyceride-glucose index (TyG) and its derived indices which better reflect metabolic disturbances on atherosclerosis has not been reliably compared in patients with type 2 diabetes mellitus (T2DM). Besides, obstructive sleep apnea hypopnea syndrome (OSAHS), a driver of atherosclerosis (AS), can exacerbate metabolic disturbances strongly. The aim of this study is to explore the mediating effect of glycolipid metabolism on the association between OSAHS and arterial stiffness in T2DM patients. 154 T2DM patients were involved in this study and were split into two groups: T2DM and T2DM + AS. Logistic regression analysis determined the accurate effects of different factors on the AS of T2DM patients. The capacity of TyG and the indices it derives to predict AS was assessed using the receiver operating characteristic (ROC) curve. Mediation analysis was employed to investigate the mediating effect of TyG and its derived indices on the association between OSAHS and arterial stiffness in T2DM patients. OSAHS, TyG, and its derived indices were independent risk factors for AS in T2DM patients. Stratified by age, the hazardous effects of TyG and its derived indices remained significant in T2DM patients aged ≥ 50 years, but not in those aged < 50 years. In T2DM patients aged ≥ 50 years, the novel indices have a high predictive value for AS, with TyG-BMI exhibiting the largest AUC(AUC:0.788;95% CI:0.647 ∼ 0.928; P < 0.001). The mediation analysis results indicated that in T2DM patients aged ≥ 50 years, TyG, TyG-BMI, TyG-WC, and TyG-WHtR acted as potential mediators in the association between OSAHS and AS, with mediation effects of 33.42%, 48.2%, 37.7%, and 40.21%, respectively. However, there was no significant mediating effect observed in the younger patients. TyG and its derived indices are strongly correlated with AS in T2DM patients, of which TyG-BMI has the best predictive performance. Besides, OSAHS partially exerts its atherogenic effect through glucolipid metabolism disorder in the T2DM population aged ≥ 50 years, while it mainly exerts a direct atherogenic effect in patients aged < 50 years.