Yes stress and anxiety can lead to insomnia which keeps you awake and doesn't allow you to get sleep at night.
When you're suffering from anxiety or stress your mind isn't allowed to shut down completely at night so when you're worrying your mind is racing.
To fix anxiety or stressed induced anxiety you need to speak to your doctor about the anxiety and they can likely prescribe you some prescription strength medicine that helps with anxiety and Insomnia.
You can also try some Apple Cider Vinegar before bed which helps me to sleep naturally and wake up fully rested the next day.
Sometimes however you may need to resort to taking over the counter sleep aids.