for some reason, this reminds me of 2 books
First book is https://en.wikipedia.org/wiki/Flashforward_(novel)
Everyone loses consciousness worldwide for 2 minutes and can see themselves in the future during that time
2nd book - https://www.goodreads.com/en/book/show/1077085
Gigantic alien spaceship show up - everyone on the planet experiences a dream, where they are all being asked if they want to leave with them. Most say yes - only few refuse.
Neither one deals with the same scenario, but I think it's the dream - mass dream bit that's similar, hence the reminder.