I felt the same way, so I know what you mean. Wouldn't have made a difference had they waited on me hand and foot, cleaned the house, brought me presents and made endless cups of tea - something about their presence made me weirdly possessive about my baby. I just didn't want them there. It's really hard to make sense of but I will try here.
It started when I was pregnant - not immediately but somewhere in my 2nd trimester. I started to get really stressed about either sets of parents coming in and taking control of everything and bossing me around. So I think having control was something fundamental to it.
My DH is close to his parents and overall they are good people. Not perfect people but good people and there's no way he would have stood for me excluding his parents for no real reason, so I did have to be reasonable. I'm glad he took that stance and didn't blindly go along with me alienating people. However, he did put in place the boundaries e.g you can come but only for this time, that day doesn't work for us, if you come you need to do xyz, we've had too many visitors we need some space now - maybe X day etc etc and he did put the walls up the first week I was out of hospital.
Something changed somewhere along the way - maybe around 5-6mths. Not sure what exactly. I think I saw the way MIL loved DC and something sort of clicked - no one else outside of DH and I are going to love this child as much as their Grandparents. But I also found I did have a voice and MIL mostly listened, supported and accommodated, if I said 'no DC needs a nap', 'no that time doesn't work for us because DC needs xyz' his parents would work with what worked best for me/DC and if on the rare times they made a remark (and it was rare) e.g well can't DC nap at Y time instead, I realised I did have the inner gumption to say 'no' to which they'd nod, say ok and get on board.
So the best explanation I can come up with is, I've always been pretty laid back and gone along with things to avoid any confrontation. But then as I became a parent, I realised I needed to be the person in charge but I didn't feel strong enough to start wrestling for it, so it felt easier to hide away instead. But actually the reality was - there was a bit of a passing the baton thing going off. MIL wasn't trying to undermine me, she just wanted to help and be a part of DC lives. DH would support me and back me.
I don't know if it was PND, my own insecurity, a fear over lack of control, a protectiveness and possessiveness over my baby, or if I just needed the space to assert myself as the Mum. I really don't know exactly but I know I felt that way and overtime it went away and now I'm not really sure why I was like that. DC adores their grandparents and our lives are better with them in it. It genuinely warms my heart to see DC running to their grandparents full of smiles and love.