Hello, 
Thanks for the query to H.C.M. Forum. 
Metformine +
ramipril twice in day  from one year. 
You have not mentioned that blood sugar is under control or not control . 
Blood pressure is under control or not control. 
Presumed that blood pressure and 
diabetes are under control. 
1 Here  one point is very important as the side effects of both drugs are G I disturbance means nausea, 
vomiting , 
dizziness . 
When there is nausea and vomiting most of patients develops 
severe headache as your headache may be due to this reason. 
When you take these tablets in the night after 1-2 hours you go to sleep so less nausea and vomiting ,hence less headache. 
2  Headache may be due to lowering of blood pressure due to use of ramipril as it  acts  just after 1/2 hour . 
So please consult  your treating doctor and get his advice. 
You may upload your complete reports over this site for evaluation of diagnosis. 
Good luck. 
Dr. HET