Anyone else get anxiety when they're trying to go to sleep? Or like...when they are just falling asleep?

I'll be listening to music to help me fall asleep and distract me from thinking so I can sleep and like right when I fall asleep or around the firet.couple of minutes of falling asleep I'll sudden wake up with my heart racing and feeling anxious. 

I've realized that I actually used to do this a lot previously like a couple times through out my sleep if suddenly wake up with a racing heart and feeling anxious or lonely. I had a feeling it wasn't normal nut I'm still learning a lot about my depression and anxiety. 

Why does this happen? It really throws me off and gets me to start feeling lonely and a whole bunch if other emotions.