This line is a multiform of the regular formula for concluding prayers that are labelled with the verb eukhomai, which is a word that designates three different kinds of discourse by using mutually exclusive formulas for each of the three. It has a two-part structure extending from the line-beginning to the oblgatory word-break within the third foot and from the obligatory word-break to the end of the line. The first chunk, hōs ephat'/ephan eukhomenos/ē/oi/ai, whose subject is always a previously identified mortal or mortals, designates that the discourse that precedes the line was a prayer and is concluded, and the second chunk, tou d' eklue |¯˘˘ | ¯˘#, designates that the divinity addressed, whose name + epithet combination is specified in the space at the end of the line, 'heard' (eklue, cognate with the English word '(k)listen') the prayer (for Poseidon, just the epithet kuanokhaitēs 'with a glossy blue mane' occurs, since his name + epithet combinations are too long to fit the metrical space) . 'Heard' is functionally unmarked in English, but in only one of the 25 occurrences of this formulaic line does it mean anything less than accepted and agreed: at Iliad 16.250, where Zeus accepts one part of Achilles' request about Patroklos and refuses (the verb is aneneue 'was refusing') the other. When the response to the prayer is (exceptionally) negative, the expression tou/tēs d' eklue 'and he/she heard him/her' is replaced with aneneue de + name + epithet (once, Iliad 6.311) 'and she was refusing' or nemesēse de + name + epithet (once, Iliad 8.198) 'and she was outraged'. There are also two places where tou/tēs d' eklue is replaced with different verbs and divine names to express an exceptionally positive response on the part of the divinity (Odyssey 2.267 and Iliad 15.377). There are also two attestations when the beginning of this line, hōs ephat' eukhomenos, is attested in a non-sacral context that evokes one of the other meanings of the verb eukhomai, 'boast (of warriors in battle)'; see Iliad 5.106 and Iliad 20.393, but in both those cases (and in no others) good medieval manuscripts attest a metrically equivalent variant hōs phat' epeukhomenos which is actually attested in the meaning 'boast' without variants in Homeric Hymn to Apollo 370; so it is clear that just the first half of this formulaic line is, despite a plausible ambiguity, traditionally associated with the meaning 'pray' in sacral contexts.
In short, this line is a manifestation of a superbly efficient and expressive system for concluding a prayer.