If nothing else has worked so far then you might want to see if you can get a script for suvorexant (Belsomra) as an option before resorting to the temazepam (and definitely before you try to get barbiturates), mostly because of the risks of dependence and the probability that you'll wind up on an escalating carousel of ever more potent benzos to maintain a reasonable prosomniac effect. That goes double if you're going to be using benzos recreationally; the recreational use could easily cause a tolerance increase that could make reasonable doses ineffective at alleviating your insomnia. Suvorexant should be safer for you in that context; it works on a completely different class of receptors from benzos. Benzos act as agonists at the GABA-A-a1, a2, a3, and a5 receptors. Activating the a1 receptor causes sedative and anticonvulsant effects, a2 and a3 cause anxiolysis and minor sedation, and a5 causes benzo brainfog as well as the associated blackouts and cognitive impairment. Z-drugs like zolpidem/zopiclone/zaleplon (brand names Ambien/Lunesta/Sonata, respectively) tend to act more specifically on a1, making them somewhat preferable to benzos for sleep issues (although in high enough doses z-drugs will affect the other three benzo receptors, hence Ambien blackouts). However, since z-drugs act on the same receptors as benzos you have similar mechanisms for dependence and you can get cross-tolerance between the two drug classes that will render the z-drugs ineffective at reasonable doses. Suvorexant (Belsomra), by contrast, works on a completely different set of receptors; it acts as an antagonist at orexin receptor sites 1 and 2. The orexin system is fairly strongly linked to wakefulness; I believe that studies showed that deficiencies in orexin (as well as issues with the quantity and sensitivity of orexin receptors) is a significant cause of narcolepsy (excessive daytime sleepiness and difficult-to-prevent involuntary microsleeps). By antagonizing orexin receptors, suvorexant effectively induces a narcoleptic episode that knocks you on your ass. Since it doesn't act on GABA receptors at all, there should be minimal if any cross-tolerance.