Sorry to hear you're having leg pain at night or at any time.
Your leg pain could be a simple muscle cramp or other causes such as musculoskeletal, neurological, or vascular problems.
If the leg pain goes away during the day and doesn't come back again for awhile then it's likely just a muscle cramp.
If the leg pain at night happens every night then it could be caused by peripheral artery disease which should be checked out by a doctor.
Also not getting enough sleep can cause muscle aches and bone aches as well since sleep is very important to our health.
I've noticed that when I haven't gotten enough sleep that sometimes both my legs will ache as well as sometimes my arms and sometimes just one of my legs will ache but then after getting a full nights rest and catching up on the sleep the pain goes away.