Shall you to bed or fall asleep 8 hours before waking up?

The ideal sleep time is usually recommended to be 8 hours, and dream recall generally gets better in the morning if you get sufficient sleep.
But what exactly does “sleep for 8 hours” mean?
Does it mean that you should go to bed or fall asleep 8 hours before waking up?
I’m wondering this because it kind of feels like trying to fall asleep should count as sleep as well, assuming that you don’t try for longer than 15-45 minutes or so, and I want my dream recall to be as good as possible.