The occasional charley horse doesn’t require an official medical diagnosis. However, your doctor should investigate frequent, recurrent muscle spasms. A diagnosis is generally obtained through a physical examination. MRI scans may be helpful in determining whether nerve compression is the cause of frequent charley horses. An MRI machine uses a magnetic field and radio waves to create a detailed image of your body’s internal structures. If your doctor suspects that nerve damage or other complex causes are to blame, you may be referred to a physical therapist or other specialist.