I don't know why it gets worse on prednisone, but cramping in general is from low magnesium.
All a blood test will show is the level in your bloodstream, but what you need to know is the level in your cells. In other words, you can have low magnesium and it won't show in your bloodwork.
unfortunately, D is a side effect of too much magnesium or a bad form of it.
above all, don't take magnesium oxide, it has a potent laxative effect. this is the one doctors prescribe.
mg aspartate, citrate, maleate, glycinate, these are all good forms. you can get it as a supplement.