I think the key to keeping warm is experimentation. Everyone is different, and it took me a lot of years and a lot of cold nights to get any kind of system in place for keeping my cold ass warm at night. Here are some of the many things I do to keep warm (those of you who don't live your life borderline hypothermic may laugh, but this is really what it takes for me to be warm and happy):
-Forget the temperature rating on your bag. My go-to is now a -15f bag, and I don't go to a lighter bag unless I am certain nighttime temperatures will be at least in the forties. I spent way too many years freezing my ass off in bags that "should" have been warm enough. If a 0 degree bag is what you need to be warm when it's 32 degrees, then that's what you need.
-Don't underestimate the power of mummification. Whenever I'm too cold, I hunker down and get my whole head into the hood of my bag. My bag has a draft collar I use to really keep all the cold air out and trap my own warmth into the bag with me. Try lots of different bags until you find one you can be comfy in this way--it really makes a huge difference.
-Remove all your day hiking clothes, especially bra and undies, and make sure those areas are warm and dry before you go to bed. Probably doesn't need saying, but soggy underlayers from sweating during the day make for clammy skin and chilly nights. Use chemical warmers as needed to get the problem areas back up to temp (for me, that means chest and rear end).
-Layer and hyperheat before climbing in. My cold weather nighttime layering system is like an onion (again, experiment--learning that I need two layers on my legs at night was huge for me), and I pregame by literally running around camp/doing jumping jacks while wearing all my clothes until I am so warm I think I might die. Then I climb into my bag toasty warm and de-layer/vent heat as needed. This serves me far better than getting straight in after sitting around at camp and spending half the night just a little too cold to really sleep. If you wake up in the middle of the night cold, try sleeping bag aerobics until you're warm again.
-Warm liquids. Either drink 'em, or put them into a bottle in the bag with you.