I second avoiding the chemical sleeping pills. There is one natural hormone pill (can be bought at a nutrition shop for like $5) that doubles as a good anti-oxidant.
http://en.wikipedia.org/wiki/Melatonin
I don't think there is a perfect on/off pill, but rather it's better to religiously keep a specific sleep cycle, as changing it frequently is the main problem.
Other problems are not getting enough regular exercise, and taking stimulants late in the day (past 3pm). If you take coffee, caffeine, 'Rock Star' / 'Red Bull' type drinks, ginseng, ephedra, etc... stop by about the half-day point, or even consider not taking them for a few days, if you have a persistent sleeplessness.
If I stay up too late, best to go to bed for awhile, and then force myself up at about the normal wake-up time, take it easy that day, and maybe drink some coffee. Then go to bed early, at least before I start feeling sick. Usually works for me though, it'll take 3 or 4 days more of a normal sleep routine, before I feel totally normal.
After pulling all nighters in college to finish papers for classes (some are last minute). Now that I have finished college, I noticed that my sleep cycle is messed up. I am wondering if there are ways to restore my normal post-college sleep cycle?