As the saying goes: think about it day and night. When you sleep, your brain is still active, and the numbers in your dreams may be what you think subconsciously.
The number in the dream is the same as the lottery number, which can only be said to be a coincidence, or the idea in your mind is consistent with the lottery number.
(The lottery itself is random and there is no inevitability. )