Why do I have headache after a gym session?

Yes, I should probably stop visiting sauna after heavy lifting. I drink water during exercises and then drink plenty of water when I come back home. While overheated drinking water is actually NOT recommended. But I like sauna because it helps with relaxation and muscle soreness.