Recently, I've started getting headaches mainly after leg-pressing on the machine.
They used to be pretty short and only last a few minutes, but they got worse and now they last for the full work-out + a few hours after I leave the gym.
Has anyone experienced this before? Is there anything I can do about it?
About 2 years ago i had something similar, which started after doing a 20 rep set of squats (never again) and then got them from any exercise after that. I'm not sure how bad your headaches are but mine were bad enough to make me leave the gym and lie down for like an hour - doctors had no idea what was wrong. I didn't train for about 6 months because of it. It sounds like you are able to train through them though so i would probably just take some ibuprofen before every session and get on with it. Really i think it does depend on how bad the headaches are though as if they are really bad, training through them could be a terrible idea. Could be worth going to the doctors as well just to be safe.
I got this a week ago whilst doing dropping to 100 reps on the leg extension. Some research has suggested that I suffer from what is known as an exertion headache - It is basically a result of improper breathing whilst lifting, which retrospectively is certainly true on my part. I believe that it is a result of blood pressure rising rapidly during exertion, and falling with equal rapidity during the negative. I now get this quite often whilst lifting, but if I pay extra attention to my breathing I'm generally fine.