I am not entirely sure why you get bright spots that last for half an hour after doing headstands.
But here's what we know. Doing a headstand, or sirsasana in Yoga, will cause venous congestion in the head and neck. This leads to a sudden elevation of pressure in the eyeballs as well, to double or more of normal.
This sudden rise in eyeball pressure causes what appear to be decompression effects afterwards when optic nerve head parameters are measured with the Heidelberg retina tomograph. This suggests that significant excess pressure is being exerted on the optic nerve head during the headstand/inverted posture.
The bright spots may be 'phosphenes' generated by optic disc compression or alternatively choroidal congestion may occur causing the choroid to press on the adjacent retinal photoreceptor cells.
I personally think it's not a good thing to be experiencing these effects, especially if they last for a while even after you go back to a normal posture. But perhaps a Yoga expert can correct me, if I'm wrong.
There has even been a reported case of visual field worsening in a glaucoma patient who started doing headstands.