That sleep stage is called 'hypnagogia' and there is an interesting book from 1987 by Andreas Mavromatis where the author investigated it from multiple perspectives.
There is a copy at <a href="https://archive.org/details/hypnagogiaunique0000mavr" rel="nofollow">https://archive.org/details/hypnagogiaunique0000mavr</a> for everybody's reading pleasure.
See also <a href="https://en.wikipedia.org/wiki/Hypnagogia" rel="nofollow">https://en.wikipedia.org/wiki/Hypnagogia</a> for reference.