Next time if you have leg cramps in the middle of the night, apologize to your leg / muscle for pulling it and it will stop cramping. Not immediately (almost though), but definitely a lot faster than if you don't apologize.
It does work.
It happened to me just last night and i remembered what my aunt told me but i wanted to see what happened if i dont apologize, and kept on massaging my calves. It kinda worsened the situation.
Tactic changed. I apologized. And it took less than 10 secs for the muscle to stop pulling and i promptly went back to sleep.
Of course, you must be sincere about apologizing. The muscle seems to have a way of detecting whether you are sincere or not.
The human body is really a strange thing, isn't it? And we thought we (almost) have a full control of it just with thoughts alone.