I get very cold when sleeping, and do the following to keep warm on cold nights:
Use a well rated sleeping bag - obvious, but important. Use the numbers on it as comfort, not minimum rating.
Wear socks and a hat - you lose most heat through your head and I often find my head escapes from mummy-style bags.
Wear layers, but not too many layers - as strange as it sounds I sleep warmer in 2 layers of thermals than one layer of thermals and one layer of ordinary clothes - something to do with heat transfer away from the body perhaps?
Eat before going to bed, but not too much or too soon - if you're digesting all night the blood is around your stomach, not in your arms and legs and your extremities get cold. Keep a thermos flask with hot liquid in it nearby for when you wake up cold in the morning and need a boost.
If you wake up cold, in the middle of the night, face up to the fact you need to get up, eat something, maybe drink a warm drink and run around. Lying in sleeping bag drifting in and out of sleep while cold just knackers you out for the next day.
Even with all of the above, sometimes you just get cold. the only solution then is an external heat source, be it a fire, stove or a warmer person to put your cold feet on