Sudden onset pain of such a nature could be due to cramp or some bony involvement.
First of all get an Xray done, get it evaluated by an orthopaedician.
Take rest for a day or two.
Take regular pain killers and hot water fomentation .
If this is not confirmatory then you might have to go for an MRI
or Colour Doppler test and proceed accordingly.