The word "Midian" appears only once in the poem, in the poem's title. Yet this word alone is enough to establish the poem's setting: The story takes place in the ancient kingdom of Midian.
Midian was a kingdom of the Middle East that existed about 1,000 years before Christ.
From clues that come later in the poem, we can also infer that the narrator is the king of Midian, and he is speaking to his wife, a woman called Astair.