I just learned about this in cardiology actually and this seems like the most plausible explanation. It's called a Valsalva maneuver. It will cause what is called an exertion headache. Valsalva maneuver is performed when you are holding your breath while lifting. You need to BREATH!
Some stuff copied from websites, would be best to see your physician if you are concerned about it.
"Primary exertional headache
You might experience an exertional headache after prolonged physical exercise, such as weightlifting blah blah.
Like the cough headache, these headaches sometimes occur as a result of increased pressure in your head, particularly if the exertion is from lifting weights. While straining to heave a weight, you may inadvertently do what's called a Valsalva maneuver, which is the term for trying to exhale while holding your breath. This act — which also can play a role in primary cough headaches — increases pressure in blood vessels in your head. Exertional headaches cause a throbbing pain that gradually builds in intensity and is felt on both sides of your head. The pain can last from five minutes to 48 hours.
Headaches after exertion can be a benign issue, but they also can point to a serious underlying cause, such as bleeding in the brain or a separation in the lining of an artery in your brain. If you have an exertional headache, see your doctor for an evaluation, particularly if it's your first headache of this type."