Do you always warm up well before squats?
I noticed an improvement in my squats and squatting comfort since i started stretching my hip flexors more. Maybe give that a go.....
This is most likely what the problem is.
Make sure to stretch the hip flexor and also the glutes.
Stretch the hip flexor pretty hard for a few weeks.
You can also try to use your thumb to massage on the sore area, most likely it's a cramping muscle.
Add pressure to the area for 10-15 seconds, the relieve it for 10-15, and repeat 2-3 times.
Do that once or twice a day for a few days, and you can also do it before and inbetween squat sets, preventing and releasing the cramps.
One final notice: Make sure you are balanced, ie you need to be equally flexible in both legs.
It's usually an inbalance that causes this problem. It also makes you tilt slightly to one side when squatting down