I believe every time you rest, the game rolls a random number from 1000 to 999,999, and if that number is smaller than your step count, the dream triggers.
Thank you
No problem enjoy the game