@beckyboo12 . Ultimately it may be best to see your GP but in the mean time you could prepare yourself and hopefully take some more information along with you.
1. Has your son increased any form of exercise recently? Even walking?
2. Has he decreased his activity levels recently ?
3. Is he maintaining his fluid levels? Too little fluid can lead to leg cramps, even mild cramping.
4. If possible keep a record of when the pain occurs and the type of pain. i.e. A dull ache, or a sharp sudden pain.
I know from personal experience that the hamstrings, the big, majorly important muscles in the back of the legs can quite often become painful with just a small change to lifestyle, usually exercise related but also lack of hydration in hot weather.
Also worth remembering that your son is still young. This could be related to him maturing and his body developing.