Nighttime hypoglycemia can be caused by a number of different factors, from exercising too close to bedtime to drinking alcohol in the evening. If untreated, low overnight blood sugar levels can lead to headaches and loss of sleep — and in extreme cases, seizures or even death. The good news is that preventing low blood sugar while you sleep can be achieved with a few simple steps: If your blood sugar levels are low at bedtime, eat a healthy snack before going to sleep. The size of the snack should be in proportion to the dip in blood sugar. For instance, a small drop in blood sugar requires only a small snack. If you use an insulin pump, consider temporarily reducing the active dose of insulin. Talk with your doctor about ways to recognize nighttime hypoglycemia, especially if you think you may have difficulty detecting it. “It’s a dangerous condition because people can’t tell when their blood sugar has dropped, since they may not have symptoms,” Dr. Rodbard says. “The body can get desensitized to it.” People with hypoglycemia unawareness are also less likely to wake up as a result of nighttime dips in their blood sugar.

3. Don’t Skip Dinner

Skipping dinner or having only a light supper is one of the most common causes of nighttime dips in blood sugar, Rodbard says. Eat a healthy, well-balanced dinner every night and pay attention to portion sizes.

4. Avoid Excessive Exercise Late at Night

Regular exercise is recommended, but strenuous exercise right before bedtime isn’t because it can cause blood glucose to drop overnight. This means you should avoid exercising in the two hours before bedtime. If your blood sugar level is less than 100 mg/dl at bedtime after exercise, double your regular bedtime snack to prevent an unwanted dip while you sleep.

5. Limit Alcohol at Night

Alcohol consumption can also increase the risk for nighttime hypoglycemia, so avoid regular consumption of alcohol. On special occasions, drink only in moderation — no more than one drink a day for women and two drinks a day for men — and don’t wait to indulge with a before-bed nightcap. If you do have a drink in the evening, enjoying it with food can minimize the chance of low blood sugar while you sleep.

6. Be Prepared

If you frequently wake up with symptoms of low blood sugar, have something available at your bedside, such as a soda or some juice, so you can react immediately without having to get out of bed to treat it. If low blood sugar at night is a common problem for you, talk to your doctor about changing your diabetes treatment plan to better control your nighttime glucose levels.