As a child I had a panic attack that involved thinking (with some unintended ‘help’) that my body was in shock & all I knew was that that could result in death. Being sleepy aided the panic attack, making it harder & seemingly scarier – in an existential way – to sleep, being convinced that I might not wake up and those last waking moments were my last conscious ones.
Even if you don’t have panic attacks, I strong suspect that stress, anxiety or repressed psychological stuff you’re grappling with could play a role. [I’m no expert in sleep & have only a strong interest and a bit of (formal & informal) education in psychology]
Something I’ve found in my own life is how surprisingly interconnected nutrition is with stress and even sleep… not having the right balance of magnesium to calcium, for instance, apparently can cause all sorts of stress, health & psychological complications as well as make it harder to sleep. (I find I never fail to get to sleep easily when taking a good magnesium supplement, weirdly enough).
Have you ever heard of the term Ego-death, perchance? I’m definitely not at all an expert on it, but bit of casual research brings up the wikipedia page on it, which mentions sleep deprivation can induce it, & it can also happen on its own. [Feel welcome to do your own exploring, researching (or even verification of citations, if that’s your thing).] The article talks about it as a thing many find desirable (or even worthy of intensive effort), but I’ve heard mention that it can be one of the most existentially terrifying experiences out there, even for those who end up making the changes it can bring about a major part of their lives. I once even found myself in a strange situation where an acquaintance of mine happened to be experiencing something like that, & it’s not something to do ignore while it’s occurring… in the moment or as a pattern in your life, especially one that’s making it hard to do something so simple & vital as sleep! I don’t know how you feel about psychology, but if it is something like ego-death, it may well have the potential to bring wonderful or very serious new dymanics into your depending on your situation & how you deal with it. We are super complex creatures living in complex, constantly shifting conditions, so it’s not untenable that there’s some undiscovered trigger or combination of factors/conditions that might trigger something potentially similar to that for you, even if not necesarily full-blown ego-death.
Honestly, if reading about ego-death resonates with your experiences or intuitions, I’d recommend considering finding a good transpersonal psychologist of some sort if able – or – just to look for a good book/article on ego-death from the perspective of transpersonal psychology or any spiritual or existential school of thought out there that you can find that seems most interesting (or, who knows, deeply appealing. Whatever works for you).
I have no idea what your conception of psychology or spirituality might be, but if you’re open-minded and concerned, or just curious enough, that’s what I’d strongly encourage a friend to do. (And glancing at a book or article really can’t threaten a solid, healthy viewpoint of being human or any possible spiritual/existential beliefs you may have except for those that entail disdaining/fearing everything not within a limited system of conceiving reality. I’ve found occasional reading about ‘weird’ ways of understanding reality to be a great way to explore myself/life/reality, merely challenge my critical thinking skills or to even strengthen my current understanding of ‘it all’ ... and, if my limited grasp on the idea of ego-death is at all correct, you might have the opportunity, if you’re willing, to grow in unexpected, cool or even life-changing ways that many people spend years in meditation or take major drugs to experience. Weird to hear, perhaps, if it’s just an annoyance or trauma for you, especially if you have little exposure to meditation or never had a conversation with someone who’s tried psychedelics. A thinker* very esteemed in widely, not just by Zen Buddhist monks, wrote this excerpt about it; I have yet to read it, but aside from being an advocate of following your own wisdom & insight and conscientously ignoring other’s advice sometimes despite what the world around you thinks, the author’s at least very interesting and at best brilliant (according to many people pretty smart & innovative in their own right) ... so, no one will be at all offended if the writing style or the thinking aren’t what you’re used to or even not your thing, but I doubt it could hurt to skim it :)
* [ Much of the spiritual path he (Osho was his name) & zen Buddhism advocates didn’t particuarly appeal to me right now (in fact, in all honesty, I’m currently a bit annoyed at a friend who can’t listen to my own goals & challenges in life without seeming to spout of some idea or advice relating to Zen buddhism. Nothing against it, just against it being a seeming barrier to connecting with a close friend!)—yet since I’ve read a few quotes & passages he’s written on much more than just Eastern spirituality, I’ve respected & occasionally enjoyed his thoughts & even writing abilities. If you have your own religion, or are a convinced atheist or can’t be described by either, so long as your open-minded you can’t be hurt by reading. And, of course, no one’s advocating anyone leave their current plans (or beliefs) to suddenly try to become a buddhist monk… but hey, if that makes you or whoever happy, & then that’s awesome, especially if no one compromises any part of themself – mind, conscience, will – in the doing, exploring or believing – or not-believing! :) ]