Temazepam can be a horrible drug, and should be used only for extreme insomnia and for short periods. The fact that it is not prescribed to those with a history of drug abuse/addiction tells you all you need to know.
Definitely try the natural / harmless remedies first. I'm lucky not to have much trouble sleeping, but my wife does, and she finds a hot milky chocolate drink last thing seems to help (though it's just as likely to be an excuse to glug chocolate). There are plenty of foods and natural preparations that are supposed to help.
For those who aren't familiar with the drug OP is referencing. Temazepam
Honestly, I would not recommend taking a prescription sleep aid on a plane. It's bad enough when you're on terra firma but I am not sure how your body would react/process the drug at altitude. Could get some wonky side effects.
http://www.avogel.ch/de/ihre-gesundh...stoerungen.php
The Swiss are master of natural remedies...