I'm not educated but there is this alternative to Xanax called Nuphorin Anxiety Relief. It helps with trouble sleeping but you should ask a doctor or pharmacist if it could be good for you
Your doctor was smart not to prescribe an anti-anxiety med. They interfere with REM sleep, lead to rebound insomnia when you get used to them, are addictive if used regularly, and don't solve the problem. If the reason you don't sleep is apnea, working on that is the only way you're going to sleep. If it's a different reason you can't sleep, if your diagnosis was incorrect, then you need to start over. Did you do a sleep study? But you do describe yourself as suffering from anxiety, though you don't say how much -- everyone has some stress and nervousness but that isn't the same as chronic anxiety that significantly interferes with your life. But since it appears to be doing that, what you need to do is learn to relax. Therapy can help with this. Meditation can help with this. Regular exercise can help with this. Lots of things can help with this. So given you're reporting feeling anxious on a regular basis, that seems to be the way to go, but taking a drug won't get you there, it will just temporarily tamp down symptoms. Drugs are for when you can't function well anymore. Therapy and learning a more relaxed lifestyle are more permanent solutions if your problem is short of severely life impairing.