Dan 2:1

2:1 In the second year. Since the Babylonian system started counting Nebuchadnezzar’s reign officially from the beginning of the year succeeding his actual succession, his “second year” could mean the end of Daniel’s three years of training (1:5). Otherwise the events took place during his training.

his sleep left him. It was widely believed in the ancient Near East that the gods spoke to human beings in dreams.