Hello there and welcome to BYC!
He may have boinked his head on the ceiling. If he became frightened and flushed up into the ceiling, they can damage their spinal cord or injured the brain. The symptoms of a "boink" is loosing the ability to stand or walk. Keep the bird warm and isolated for a few days. You may need a heat lamp if the bird is cold. (injured birds get cold) Keep food and water really close by and you may need to hand feed the bird and dip the beak into the water every hour for a few days. Many birds do heal from from this if the supportive care is at tentative. If the damage is bad enough, sometimes they don't make it. Since your bird is fairly conscious, he may heal just fine. Just keep close watch on him, keep him isolated and warm, feed and water him for a few days.
Keep us posted!