Several issues here: your blood doesn't flow as rapidly at night and whatever is causing you pain isn't dispelled as it is when you're active in daytime.
Pain is often caused at night by dehydration and with neurophy as well, the blood vessels might be slightly compromised.
Make sure you have bottled water to hand and drink before, during and when you wake with pain. Yes, you may have to get up to the loo 30 mins later but that's better than pain.
If you are diabetic, sugar can cause pain. If you can be sugar free and low carb as well, you can reduce or even stop the pain.
Dehydration can also cause cramp in addition to that caused by other factors. I often go through two 750ml bottles of water at night, depending on weather and also if I have a bout of nocturnal hypoglycemia (night sweats) common to many diabetics. Again, replacing this water loss with a good old glug of fresh water solves the problem.
I don't even need to leave my bed as I use those sipper bottle - lazy beggar! 
If the pain is simply cramp; take magnesium before bed with a full glass of water.
Water is for the dehydration so common in the night. Magnesium relaxes the muscles and may help you sleep too. It's a safe remedy for cramps as long as you are not taking medication, such as some antibiotics on which magnesium may have a lessening affect.
Check with your doctor - or take the magnesium 4 - 6 hours after the antibiotic.