Quality Sleep = Nutrition, Light environment and exercise.
Nutrition: If you don't have proper magnesium and potassium stores, you're going to have issues with sleep and anxiety. Just look at the daily requirements for potassium alone - approx. 4500mg. Most people get about a quarter of that in a day if their lucky. Potassium and Magnesium are also intimately tied to weight loss and neuromuscular pain. Grab a free food nutrition app to track and adapt.
Many MDs will tell you diet doesn't matter which is comical. "Eat this pill instead..." Play the long game for your health and quality sleep. Nutrition doesn't work like medications. It takes a few weeks to build up proper levels. Medications are like a sledgehammer. They push around inflammation and trick the body through chemical means.