A scientific study of this exact phenomenon, that of forgetting things that happened just prior to falling asleep, was published in 1994. Titled "Sleep Onset Is Associated With Retrograde and Anterograde Amnesia," it concludes:
In general, if sleep is viewed as the event that led to the amnesia for the stimuli, as is the case under a consolidation theory, then one would consider retrograde amnesia to have taken place. However, if pre-sleep arousal level is viewed as the cause ofthe memory deficit, then anterograde amnesia would be said to have taken place. The results of this study lend support to a theory that poor encoding associated with the low presleep arousal level and sleep itselfled to the memory deficits. Under this explanation, both of the terms retrograde and anterograde are needed to accurately describe the phenomenon.
So the proper scientific terminology would apparently be the (retrograde and anterograde) amnesia associated with sleep onset. This isn't a single word, but it appears to be the best available term in the literature.
Presumably one could shorten this to sleep-onset-associated amnesia.