This is done by a combination of proper diet, regular exercise, and insulin or other medication such as metformin, etc.Those with hyperglycaemia can be treated using sulphonylureas or metformin or both. These drugs help by improving glycaemic control. Dipeptidyl peptidase-4 inhibitor alone or in combination with basal insulin can be used as a treatment for hyperglycemia with patients still in hospital.Hyperglycemia can also be improved through minor lifestyle changes. Increasing aerobic exercise to at least 30 minutes a day causes the body to make better use of accumulated glucose   since the glucose is being converted to energy by the muscles. Calorie 
monitoring, with restriction as necessary, can reduce over-eating, which contributes to hyperglycemia.Diets higher in healthy unsaturated fats and whole wheat carbohydrates such as the Mediterranean diet can help reduce carbohydrate intake to better control hyperglycemia. Diets such as intermittent fasting and ketogenic diet help reduce calorie consumption which could significantly reduce hyperglycemia. Carbohydrates are the main cause for hyperglycemia—non-whole-wheat items should be substituted for whole-wheat items. Although fruits are a part of a complete nutritious diet, fruit intake should be limited due to high sugar content. Epidemiology
Environmental factors
Hyperglycemia is lower in higher income groups since there is access to better education, healthcare and resources. Low-middle income groups are more likely to develop hyperglycemia, due in part to a limited access to education and a reduced availability of healthy food options. Living in warmer climates can reduce hyperglycemia due to increased physical activity while people are less active in colder climates.
With normal glucose levels, the total amount of glucose in the blood at any given moment is only enough to provide energy to the body for 20–30 minutes, and so glucose levels must be precisely maintained by the bodys internal control mechanisms. When the mechanisms fail in a way that allows glucose to rise to abnormal levels, hyperglycemia is the result.Ketoacidosis may be the first symptom of immune-mediated diabetes, particularly in children and adolescents. Also, patients with immune-mediated diabetes, can change from modest fasting hyperglycemia to severe hyperglycemia and even ketoacidosis as a result of stress or an infection. Insulin resistance
Obesity has been contributing to increased insulin resistance in the global population. Insulin resistance increases hyperglycemia because the body becomes over saturated by glucose. Insulin resistance desensitizes insulin receptors, preventing insulin from lowering blood sugar levels.The leading cause of hyperglycemia in type 2 diabetes is the failure of insulin to suppress glucose production by glycolysis and gluconeogenesis due to insulin resistance. Insulin normally inhibits glycogenolysis, but fails to do so in a condition of insulin resistance, resulting in increased glucose production. In the liver, Fox06 normally promotes gluconeogenesis in the fasted state, but insulin blocks Fox06 upon feeding. In a condition of insulin resistance insulin fails to block Fox06, resulting in continued gluconeogenesis even upon feeding. Medications
Certain medications increase the risk of hyperglycemia, including: corticosteroids, octreotide, beta blockers, epinephrine, thiazide diuretics, statins, niacin, pentamidine, protease inhibitors, L-asparaginase, and antipsychotics. The acute administration of stimulants such as amphetamines typically produces hyperglycemia; chronic use, however, produces hypoglycemia.