try to sleep there is no difference in sex if you tired its still enjoyable
psychiatrist aka drug pusher only knows how to drug push to mask the symptoms go for it if you want a band aid on your problem.
If you really want to fix your problem, fix your diet, make sure you're getting enough Vitamin D and Magnesium, stop eating sugar, caffeine and avoid blue light 3 hours before you got to bed.
If mental stress is keeping you awake then practice meditation.
It's the long way around it but if you start taking drugs given by Mr/Miss PHD it will have massive repercussions later in life.
i had the same problem i fucked up my schedule a couple times because of it