In the Hebrew Bible, the verb followed by a noun associated with a deity or his representative frequently signals an oracular inquiry. In fact, it is believed that such inquiries made to YHWH often involve the more archaic practice of using the Urim and Thummim.
1 Such a practice was prescribed for Joshua in Numbers 27:21. But it might be somewhat hazardous to assume that anything was completely normal in the period of the judges, including the manner of 'asking God' about things.
At the same time, it is likely not important for us to know how the inquiring was done. "It is the fact of the asking rather than the manner that matter."2
1 After the death of Joshua, the people of Israel inquired of the LORD, “Who shall go up first for us against the Canaanites, to fight against them?”