Is the drug temazepam ever used for anxiety?

Not usually. Temazepam (restoril) is used as a sedative-hypnotic, for people with insomnia. I've never heard of anyone using it for anxiety alone. It can act in 30-60 minutes, and if you took it in daytime you could be asleep rather than merely calm! so i wouldn't suggest doing that. There are better choices for anxiety -- especially having a good evaluation so the best choices can be made.