Is it possible to faint when you sleep? Sometimes I wake up in the middle of the night and feel wide awake and it flashes before my eyes (not migrane)

No. By definition you have to be awake to faint. If you awaken and are seeing flashes of light it is not fainting. If this is the only time you see flashes of light it is probably not your eyes. It could be an ocular migraine without pain. Yes you can have a migraine that has no pain. A migraine is a type of headache not severity and there are painless types.