It is not very obvious at the first glance why there would be any connection between hypnagogic hallucinations (also hypnopompic ones) and sleep deprivation. However, there are many processes which get disturbed in the body if someone is suffering from chronic sleep deprivation. The reason I specify chronic is because it is not likely that there would be any hallucinations following just a day or two of sleep deprivation due to working late or staying up at night. It would have to be a continuous lack of sleep in order to result in problems in the body which, I am certain, everyone has experienced by just looking even at a person who has not slept for 24 hours (there are a bunch of self made experiments by people on YouTube if you’d like to see that).
sleep deprived person
Just from those videos it is quite easy to see how destroyed the people are, barely staying awake and speaking silly things and unable to understand or communicate in general. Well the people who suffer from sleep disorders like sleep deprivation are exactly in the same shape with the only difference that usually they did not do this to themselves on purpose or forcefully.
Exhaustion & Sleep Deprivation Can Certainly Trigger Hypnagogic Hallucinations
Loss of proper mental functions
Disturbed internal body processes
Just to name a few (and there are more) are all consequences of sleep disorders like sleep deprivation, disturbed or irregular sleeping schedules, loss of energy and daytime fatigue due to lack of sleep, etc.
And all of the above conditions, in turn, result in ultimately insufficient nutrition for the brain (both oxygen and nutrients) as well is disrupt important processes like cell repair and regeneration which all have the effect of weakened or disrupted brain functions easily increasing chances for hypnagogic hallucinations to occur.