Here "the spirit of" means "to have the characteristic of" being asleep. Yahweh causing the people to be asleep is spoken of as if "the spirit" were a liquid that he poured out on the people. Also "deep sleep" is a metaphor that means the people are senseless and cannot understand what Yahweh is doing. Alternate translation: "The reason you are senseless is because Yahweh has caused you to be spiritually asleep" (See: [[rc://en/ta/man/translate/figs-metaphor]])
Yahweh causing the people to be senseless and not to understand what he is doing is spoken of as if he closed their eyes and covered their heads so they could not see. Alternate translation: "It is as though Yahweh has closed the eyes of the prophets and covered the heads of the seers" (See: [[rc://en/ta/man/translate/figs-metaphor]])