Hello, thanks for your approach to us, yes tats true both are interlinked. Anyone are stressful - feel anxiety naturally leads to insomnia. It could be for overthinking / thought processes, fear of future what could happen... For various reasons the person will end up with this situation, it is for personal, professional, relationship and others.
The same way you might have ended up with this crisis, however doctor have prescribed you accordingly, but dealing with anxious or stressful things should be your next step.
The cope with the problems is very important apart from having medication.
Next Steps
It could be changing your lifestyle,
Understanding what made you feel stressed or lack of sleep,
Work or think about how you you would like to be yourself in upcoming days,
If something better what is it, possible to fix a goal?
Which one you would like to give priority to self or other things and why?
You can take the help of an experts, if you would like to overcome the problem, approach psychologists to work on suitable therapies.
Health Tips
Try to have routine, organise with day to day activities, proper diet, you can do exercise with some relaxation techniques which calms you , avoid that triggers your emotions along with stimulants coffee, tea or smoking or drinks (your choice). Create hobbies or playing games/ spending time with friends and family members. Take care, stay positive 🙂