Same problem.
It's a type of insomnia, but it all depends on how severe and if there's any other symptoms.
My solution:
1.) Eat healthy, diet can cause all sorts of problems if you're eating habits are unbalanced.
2.) Do not eat/drink anything with caffeine or energy supplements after 2PM if possible, if you want some tea or coffee, drink decaf.
3.) Do not eat after 4PM unless necessary, 6PM at the absolute latest. You may eat a small, light, healthy snack before bed if required.
4.) Try taking Melatonin, it's a natural anti-depressant and anti-histamine that works great with insomnia.
5.) Try going to bed early, 9PM-10PM latest if possible. If you do wake up in the middle of the night, either try to stay occupied and awake throughout the rest of the night, and the next day (warning, exhaustion may occur), or see next step.
6.) For temporary relief, try sleeping pills. I was wary of taking these up until recently, however I finally went out and bought some a couple weeks ago. $4 a pack of over the counter pills you can get at Target or pretty much any other retail store. They do indeed work, and I've not experienced any side effects. (Don't get Tylenol PM, it tears up your stomach if you don't need the extra ingrediants in it.) Try taking one at night, around 9PM, and see if it helps. If it does, then the next night, start at step one, and repeat, however if it does, within a few days, you should see some serious results, if not, see a doctor. After those few days, try not taking the pill before bed, to avoid it becoming a habit, only take them if you need them, i.e. if you wake up in the middle of the night and can't get back to sleep.
7.) Get up early in the morning, 5-6am 7 at the latest.
8.) Avoid thinking about things you want or need to do, it will keep you up thinking about them.
9.) Try some "white noise" like a small fan, or radio playing really really low, that helps me quite a bit, I can't sleep without a small fan running >.<
10.) Try a bit of excercise during the day too, for at least an hour if possible. A walk, jog, run, bike ride, are great.
11.) Stay consistent!
12.) Sleep
Sleeping pills I recommend for sure: Unisom (what I'm currently taking when needed) Up&Up (Comparable to Unisom)
Hope this helps somewhat.
@Seabeast, REM Sleep (Rapid Eye Movement) You can find information here:
http://en.wikipedia.org/wiki/Rapid_eye_movement_sleep
I'm too lazy to write a longer post atm. Needs to get to sleep myself.
G'Night.