First of all, you had better go to the doctor's to have your eyes examined, and if necessary, the doctor may have your eyes sterilized and applied by medicine and wrapped up with bandages. Before you sleep, you should clean up your eyes and change the old medicine with new one, then sleep with your back on the end. You had better not sleep on either side of your body especially on the side of the scratched eye. This is because that sleeping on the scratched eye will compress the blood vessels and optical nerves on that side, making the blood transpotation not very smooth, thus the scratched may easily get swelling or congested. Besides, sleeping on the side of the scratched eye may easily rub the wound in the eye as well, making the condition even worse.
Well, generally speaking, it is kind of annoying to have scratched eyes. And what is more, it can be very dangerous to have it too. For your situation, I will suggest you wear a pair of eye patches when you go to sleep. And in that way, it can be bothersome, but doing so it can protect your eyes well, and also, insure a speedy recovery for scratched corneas. In common, if your scratched eyes are not severe, it will take 24-48 hours for a basic scratch to heal. On the other hand, for some scratched eyes that include infections and it will also need oral and topical antibiotics and may take up to 4 weeks to heal. So you need to be more careful about it.