When your blood sugar level is too high, it will prompt your body to release urine frequently (a point we will explain further later). This can cause your body to become dehydrated and have an electrolyte imbalance.
The dehydration caused by fluid loss can cause the brain to slightly shrink, causing the brain to pull away from the skull. This is the pain cause inherent in dehydration headaches. The severity may be mild or may become as extreme as a migraine. Luckily, dehydration headaches are relatively easy to fix. Simply drink lots of water, and your brain will regain its former glory in size, alleviating the reason for pain.