I understand closing eyes for prayer as something done as a matter of course by Western Christians, and possibly also by other religions practicing in the West and/or by Christians practicing elsewhere. (That said, I did read one thread that suggests that Orthodox Christians find it odd...)
My attempts at Googling this yield a frustratingly uniform plethora of threads on why this is done rather than on its origins.
The Bible has a few mentions of people "lifting up their eyes" to heaven when they pray, both Old and New Testament. It also mentions falling "face to the ground", which I guess might have given rise to the more convenient closing of eyes — who knows.
A few short articles I read and longer articles I skimmed discuss the history of prayer, but either focus on the theological significance of prayer or, if they do discuss posture, zero in on uplifted hands or falling prostrate, but don't seem to discuss closing eyes.
To get any further I guess I'd need to know something about researching history, or else ask here. :)