Hi. I'm online and happy to answer your question today.
It is hard to tell why you got a black eye while you slept. It is possible that you may have bumped or rubbed your eye in your sleep. As long as there is no pain and your vision is unaffected this should not be anything to be concerned about.
Like a bruise elsewhere on your body there is no treatment necessary. It will slowly go away.
If, however, you have difficulty closing your eyelids, notice any change in your vision or have any pain etc I would suggest you see your ophthalmologist.
Does this make sense to you?
And, now, the obligatory word from our sponsors: :o)
I hope that this information was helpful for you. Please, allow me get credit for my time and effort in assisting you and press the ACCEPT button for this assist. I will be glad to answer additional questions until you are satisfied. Thank you very much. Positive Feedback and/or Bonus is welcomed and appreciated.
I see that you are offline. We can use the Q&A system to 'text message' each other. An email will be sent to each of us every time something is posted to this thread.