Def wasnt an orgasm if it hurt like that. There are certain positions in sex that dont feel good...and you have to find what works for you.....
Was it the same as when you stand up too fast and get light headed? Could it be possible that you had a rush of blood to the brain when changing positions?
Has it happened since, or regularly?
i haven't tried it since, but no it never happened to me before that was a first