Steroids definitely affect your hormones, and headaches can also be hormonally related, it wouldn't hurt to ask you doc about trying something other than the steroid.
If you are on prednisone, which can cause sleeplessness, are you taking it very early in the morning?