Once you are sure what is causing the spike in the blood sugar level, you need to take measures to control them accordingly. You can discuss your situation with your doctor and based on your situation, he may prescribe you one of the following options.
For dawn phenomenon:
Changing the timing or type of your diabetes medications
Eating a lighter breakfast
Increasing your morning dose of medication
For Somogyi effect:
Decreasing the dose of diabetes medications at night
Adding a bedtime carb-loaded snack
Changing your exercise schedule