The Holy Spirit imparts knowledge, wisdom, understanding, counsel, dreams and visions when and where He chooses.

This can be any time.

Some have found that the still small voice can be heard more readily in quiet times, like for Elijah in 1 Kings 19:12

Be prepared to receive from the Lord in the quiet time of Silent Prayer.