Working out raises your blood sugar, fasting also can cause high morning fasting numbers (particularly in T2) because your liver creates glucose. The problem with T2 is the liver and insulin don’t function properly so instead of going, “Oh my looks like it’s time to wake up/perk up, here love, have a little sugar” it goes, “OH FUCK WAKE THE FUCK UUUUUUPPPPPP” and blows its whole load of glucose all at once.
This is why it’s often recommend to have a small snack before bed if you’re having problems with your fasting bg. That way your body uses that for energy and your liver doesn’t go nuts producing all that sugar.