All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
We are not aware of any evidence which prohibits a person from looking at the ceiling of the Ka’bah when he is inside it.
In principle, this is permissible unless there is evidence which prohibits it.
Allah knows best.