This is a very interesting case.
First things first, we should determine why one moves and how one moves. The concerning brain area is the primary motor cortex.
The primary motor cortex (M1) lies along the precentral gyrus, and generates the signals that control the execution of movement. Secondary motor areas are involved in motor planning. [...] 1
As you probably know is the human body controlled by electrical pulses, so-called action potentials. These control your body and are sent out by the brain (very simplified).
Electricity is a natural phenomenon in our body and it is involved in the specific functions of certain special cells in the brain and in smooth and striated muscles. Each pattern of light, sound, heat, pain, each twinkle, finger snap, each thought translates into a sequence of electric pulses. How does it happen? [...] 2
You should read a few paragraphs before proceeding reading if you don't know about action and resting potential anymore.
As I believe that you are someone who is competent to use Google, I tell you that I haven't found anything related to cramps and mental willpower as well. But I found something else which sparked my interest.
We tested the hypothesis that the nervous system, and the cortex in particular, is a critical determinant of muscle strength/weakness and that a high level of corticospinal inhibition is an important neurophysiologic factor regulating force generation. [...] Mental imagery training, however, attenuated the loss of strength [...] These findings suggest neurological mechanisms, most likely at the cortical level, contribute significantly to disuse-induced weakness, and that regular activation of the cortical regions via imagery attenuates weakness [...] 3
This research is phenomenal, suggesting that thinking about exercising can attenuate muscle loss and could even promote hypertrophy. You may ask now what this has to do with your case.
A cramp is an involuntary and forcibly contracted muscle that does not relax. Cramps can affect any muscle under your voluntary control (skeletal muscle). [...] 4
Of course, what now follows is but pure speculation but I guessed that I could try.
If we pair the findings above mental exercise and the reasons behind a cramp and the information of what we know of action and resting potential, we could conclude that thinking about a muscle area in particular promotes movement and simple action in it. As a cramp is defined as a contracted muscle which is not able to relax, thinking about it might promote movement and action in it once again, resulting in the satisfying feeling of getting rid of the cramp.
It's important to know that you usually move subconsciously - you don't think too much about grabbing this one glass of water, walking around the corner or getting in and out of the bus. This is all done by your subconscious in order to keep your attention fixated on something more important. Imagine if you think about moving your muscles all day, we would live a life with information overload where we can't think of the important things.
So figuratively speaking, the following happens: Your commando center has a Commander-In-Chief, you, and a lot of subordinates. One for moving your legs, one for keeping your heart beating, one for getting embarrassed, one for simple walking and many more. Of course, every subordinate needs to learn their trade and this is done by practicing. So, especially in your childhood, your subordinates are eager to learn. You, the Commander-In-Chief, still always have the right of way - if you say something, your subordinates do so. So it happens that one of your subordinates makes a mistake, for example biting your cheek while eating, and you, the Commander-In-Chief, are left with the consequences. So you think about it, get angry at yourself and hope that your subordinate, your subconscious, has learned it. The same goes for a cramp. A subordinate wasn't wary enough and a cramp occurs because of one of the many reasons (overuse of muscle, dehydration, muscle strain, etc. 5). Oh snap! The subordinate is overloaded and you have to handle it by enforcing your electrical signals on this very specific point in your arm and, voíla, your arm is able to move again because you ordered your little army of electrical impulses to go to this specific point to isolate the problem.
As earlier stated, there is absolutely no scientific basis for this and neither I'm a physician nor a researcher so take this with a grain of salt. But I hope to have given you at least one idea of what might happen.