Thanks for writing your query.
After reading your post, it seems that you are having a Migraine
These are usually accompanied by visual or auditory disturbances along with nausea/vomiting
Other common cause is cervical spondylosis
You should get a MRI of head and neck done to confirm the diagnosis.
Migraines are usually triggered by some factors. Common ones are :-
1. Lack of sleep.
2. Physical exertion.
3. Missed meal.
4. Excess of coffee/smoking/alcohol.
5. Dairy products.
6. Mental/emotional stress
You should avoid sleeping on thick pillows to avoid pain due to cervical spondylosis. Other precautions include avoid lifting heavy weights, avoid working on computers for long durations.
I would also suggest that you should get yourself clinically examined and investigated to know the cause of your symptoms.
You can take painkillers like Ibuprofen
twice daily after meals along with an antacid like Omeprazole 40 mg once a day along with Domperidone 10 mg.
I hope this is helpful to you.