I advise against beginning any sort of drug regiment so close to your test date.. I know its enticing, but altering your body's normal balance may do more harm than good, you don't know what kind of affect it may have on you.
Try ceasing the studying at least an hour before you go to bed.. and do something boring. Which means, no computer, no tv, nothing electronic, no caffeine at 4-6 hrs before bed.. Don't eat a lot before bed.
How much caffeine are you drinking every day? When do you stop studying normally? try engaging in mental activity unrelated to the test, do the newspaper crossword puzzle or something.
But I really think you should think long and hard before trying drugs to sleep.. cmon you know all about how it decreases REM sleep, and there are a lot of side-effects associated with sleeping pills. Its just not a good idea. The only time I would say maybe talk to your doctor about it is if this is happening to you a month before your exam, but not when your body doesn't have enough time to adjust to it.