The stomach and leg pain are unlikely to be related. Possible cause of
stomachache include GI/ GU related causes
, neuro-muscular causes
, infections, inflammations, etc; while knee/ leg pain can be caused due to joint arthritis, fractures, neuro-muscular/ vascular causes etc. I would suggest getting this evaluated by a primary care physician initially and depending on the causes diagnosed/ suspected, this can be managed accordingly or specialist(s) care may be sought.
Hope this helps.