Look..
Firstly what is the sense in jumping from one fire into another. A guy who offers this arrangement, he sees your vulnerability and is exploiting it. It's not respect or Pretty Woman. The reality is that if a guy objectifies and exploits you to this extent, he probably doesn't care about when you're too tired to have sex.
This isn't and won't be like friends with benefits. Your entire sense of safety (and I don't put that lightly, having a home/roof over head is a significant factor in feeling safe, in having a more stable mental health. And statistically, even coming from a bad home has a better outlook than homelessness) ..so your entire sense of safety and wellbeing is locked up in whether he decides you can stay when you say no to sex. Which effectively means you can never truly consent. It's not real consent when there are consequences to saying no.
And if that isn't enough to dissuade you. I've done this. Out of necessity because I was actually homeless and even with that incentive - bench or bed - it wasn't a pleasant experience. It's not gonna be diary of a London call girl. It's going to be sweaty, awkward, dehumanising and really the flat and the location will mean feck all to you when he is asking you to do a sexual act you're not comfortable with, hate or physically hurts. And when you try to say no or otherwise indicate you're not into it, he sends a whole bunch of verbal abuse at you about what a piece of *** you are and how you knew it was the agreement.
You're putting your life at risk. For what? There are ways into housing that are way less risky