You may not realize this, but that cage is too small for a cockatiel. If possible, you should significantly increase the size. The links provided by Wendy will give you a very good idea of what might be more appropriate for a bird the size of a cockatiel.
As for his eye, I suspect night frights. They are common in many cockatiels. He probably got startled during the night and crashed headlong into every wall of the cage before finally calming down. If one of those toys had an edge or protuberance of any kind, I'd imagine it might do that kind of damage.
Oh, and that medication. Is it for human use? Because the concentration might be too high for a parrot. You really should try and find an avian vet to see him. They could tell you what medications would be needed and in what exact dosages. The wrong medication or too much of the right one could further damage your bird's eye.
Jake YNA 1970,Kia Panama amazon1975, both i removed from nest and left siblings, Forever Home to,Stacie (YN hen),Mickie (RLA male),Blinkie (YNA hen),Kong (Panama hen),Rescue Zons;Nitro,Echo,Rocky,Rub
Try doing what Doublete suggested, it's an excellent idea! (Place bird in a padded hospital tank to keep him safe from
Himself til he heals. Try a nightlight. )