Hi,
Welcome to the ehealthforum and I am really glad to help you out. Your concern is regarding the headaches that you are having in the second trimester. Most commonly these headaches are the result of hormonal changes, fatigue, hunger or physical and emotional stress. Eat a healthy, nutritious diet, exercise moderately and take plenty of rest. Rest in a dark room and practice deep breathing. But if the symptoms are severe then please consult your dermatologist and do not take any medicines on your own as none of the medicines are safe during pregnancy.
It is very difficult to precisely confirm a diagnosis without examination and investigations and the answer is based on the medical information provided. For exact diagnosis, you are requested to consult your doctor. I sincerely hope that helps. Take care.