Hello,
There can be several possibilities for your symptoms. For syncope/fainting to occur, either the reticular activating system in the brain needs to lose its blood supply, or both hemispheres of the brain need to be deprived of blood, oxygen, or glucose.
So it can be due to fall in BP, hypoglycemia, dehydration and inadequate electrolytes(sodium and calcium) in the body, postural hypotension, blockage of arteries supplying blood to the brain esp. the carotids,anemia,vasovagal attacks or underlying neurological conditions.
Pls get your blood pressure,blood sugar levels and Hb levels evaluated.You can also take some iron supplements for some days and see if the symptoms persist.
If the symptoms persist then pls get it evaluated from a physician.
Hope it helps.Take care and pls do keep me posted in case you have any additional doubts.Kind regards.
Maybe you could try eating something light before you go to bed to stop you feeling faint in the morning. To avoid headaches you need to ensure you're not dehydrated...perhaps take a glass of water to bed.