Hey, Ive been playing for a while but recently when playing with some other guys we were playing for a bit of a while (around 3-4 hours) And When comping just two chords, my fretting hand started to lock itself down, like i felt i was really pressing hard against the fretboard but when trying to keep the groove going and just relaxing, it didnt work. It felt like i had to push so hard to make enough noise and play tight. It was kind of scary because i knew i didnt want that to happen again.

Any tips you could give me?
Common thing-wouldn't worry about it,happens to me,when I'm doing bar chord stretches, very painful,you just work through the pain/cramps,or,rest for a while,try doing finger stretching exercises, when your sitting down,whatever,it should help.
If you're experiencing any strange pain, do not keep playing and do not try and push through it. Pain is your bodies way of telling you something is wrong. Your hands, arms, and shoulders should be relaxed when you play and you shouldn't feel any pain at all. If you do start to feel pain, take a day or two off and come back well rested. Also adjust your technique if you need to.

I used to play with a lot of tension in my hands when playing power chords and barre chords without realizing it, and started getting symptoms of Tendonitis, a repetitive strain injury, and it forced me to re-evaluate the problems with my technique. I don't mean to scare you, I just want to highlight the importance of watching your technique and listening to your body.

Make sure you stretch and warm up before you play, keep relaxed and don't over-exert yourself, and most importantly listen to your body and you should be fine.
Thanks, I dont necessarily feel pain when i play but its more that the day after my fretting hand often feels very tired and used, like i worked at a construction site or something.