This is a tricky situation and at a time when you are all a bit vulnerable. You are needing to find your own way of doing things and someone is there "telling you what to do." And you are still heaving with hormones and flooded with the instinctive "protect my child" tigerish qualities that we all have towards our children as a matter of nature.
It sounds as though MIL does not have a lot of satisfaction in her life, and she is suddenly presented with a situation where she feels she has a role and can make a contribution.
So, the situation is set up for conflict.
Where does your OH stand on all this? Would he sit down with you and sort some ground rules that you could then discuss with MIL, or is he desperate to keep out of it , as indeed a lot of men would be? It is quite important that the two of you find common ground over this, so that you can tackle it in the right way together.
We had one of our DDs and OH and baby living with us for 5 months and we did indeed need to be very careful about how we played things. We were very careful to make sure that she felt that her decisions about how the baby was cared for had priority, but that our decisions about what is acceptable in our home had their proper place too.
I have to say, it was a delicate game to play, and I am not at all surprised that your MIL, in the context of her rather unsatisfying life, is finding it tricky.
But - she should not indeed be telling you that you are an unfit mother - this is of course out of order and must be very hard for you whilst you are finding your feet as a new Mum. We are all vulnerable to criticism at this time.
I know it is hard to find the energy when you are beset with sleepless nights, but one idea might be to try and develop a life for you and the baby outside of the home: mother and baby groups, visits to friends, visits to the swimming pool or library for their baby sessions etc.
Please do pursue all channels for finding your own accommodation (housing dept, CAB, housing associations, private rentals, MP) and do not be worried about MIL's custody threats.
It might help if you could try and treat MIL as a sad and lonely middle-aged lady who is frightened about losing this lovely new person who has come into her life.
Being a grandparent is not always easy, and, whilst it does sound form your account (and we have only heard one side) as though she is getting a lot of things wrong, at least she does care about her, and there are few enough people in our lives who love us unconditionally, so the aim should be to keep her in your lives, but on your terms when it comes to child care.