I'm 24 weeks pregnant and having a pain on my right side.

the pain is closer to my hip only on the right side and when I lay down its uncomfortable. it feels like a dull pain and sometimes is kinda hard over there where it hurts. I was thinking maybe she's hitting a nerve? or maybe it's gas? what do you guys think....