how long is the "window" open for immediately goin

the title was cut off, the rest is: ‘for immediately going into REM sleep after falling back asleep’

I’ve read that after you’ve slept a handful of hours, you enter into REM sleep faster after falling back asleep. so if you slept 4-5 hours and then woke up for a bit and went back to sleep, you’d enter right back into REM. so my question is, how long is this “window” open. for instance, could you sleep for 5 hours and then stay awake for 5 hours and still enter REM right away? 8 hours? etc. obviously at some point after staying awake your body would “reset” and need to go through deep sleep, etc. first before REM. any ideas? has any research been done on this?

I’m no expert, but i’m sure the window is relatively small. Maybe an hour at the max IMO. After that I believe your body enters a “wake up and get ready for the day” phase. This is where your body and mind become more alert of it’s surroundings.

But this is just my thought. It might not be 100% correct. But i’d bet that i’m pretty close.

This is a bit off topic:
This has probably been asked lots of lots of times before, but you can only dream while in REM sleep, right? And I know REM is supposed to ‘kick off’ after an hour or more of sleep.
But a few days ago when I took an all nighter, I decided to get half an hour of sleep, and I dreamt during that sleep. Fairly vividly as well.

that was likely just hypnagognic imagery

@MER
others have experienced this too. see this topic dream in first 30 mins of sleep
We can dream in NREM, also REM can start sooner than normal.