@candyquilt-- They can be used if the cause of the pain and cramps is a spasm or other serious condition where there is severe inflammation.
Cortisone is a strong drug, it's a steroid like you said. So it is only used in serious conditions when other treatments like pain relievers and muscle relaxers are not enough. For example, if someone suffers from a severe leg muscle spasm which affects the function of the muscles and nerves, then the doctor may prescribe cortisone.
Usually however, leg pain and cramps go away on their own without any treatment. A pain reliever can be taken or hot packs, massage or stretching exercises may be used in persistent cases.