Insomnia has been associated with changes in metabolism causing irregular insulin secretion, insulin insensitivity, and poor glucose metabolism, increasing the risk of diabetes mellitus. Magnesium and potassium are electrolytes that play a key role in the regulation of sleep hormones and other factors that contribute to insomnia and diabetes collectively. The study contributes to the literature, as the scientific novelty of the article is targeting the insomnia and diabetes together with potassium and magnesium with a considerable sample size. The Objective of the study was the comparison between magnesium and potassium and determining their combined effect on insomnia, insulin resistance, and quality of life among patients with diabetes mellitus. Methods: In the future, a study with single blind randomized controlled trial will occur. The clinical trial registration number is NCT04642313. The study will occur at the Diabetes Center of Akhuwat Health Services, Lahore, within 18 months. Sample size will be of 320 individuals having diabetes mellitus and insomnia from both genders aged between 19 to 65 years. The control group will be given a placebo. The experimental group will receive the intervention in the form of Magnesium (Mg), Potassium (K), and Mg+K tablets. Outcome measures will include dependent and independent variables along with BMI, blood glucose measurements, and measurement of sleep parameters. Quantitative data will be presented as mean and standard deviation. After the data collection, SPSS Version 25.0 will be used for the analysis. For comparison between treatments ANOVA test will be applied while the chi-square test will be used to analyze categorical data. It is expected that the results will provide useful insights into the effectiveness of clinical interventions on the quality of life among patients with diabetes mellitus. Keywords: insomnia, diabetes, potassium, magnesium, sleep hormones. https://doi.org/10.55463/issn.1674-2974.50.2.27