Sleep apnea or sleep insomnia pills??!

is there such thing??? so i haven't been able to sleep for the past year or so so i would sleep so late and wake up late .. 
idk what i have because i would be up all night and when i would go to sleep, i wake up with numbness and anxiety attacks???? im thinking cuz due to my sleeping patterns 😩. what should i take then?? anxiety pills or sleep apnea insomnia medication.?