The term crashing could fit. It's slang for staying somewhere, usually implied that it's staying and not paying. I don't know if this slang is common where you or your audience are, so it may or may not work. Other slang, as Unreason mentioned, would be sofa-surfing or couch-surfing.
I had to cut expenses by moving out of my place and crashing at my friends' apartments.
A more formal term could be residing, but it's not implicit (not to me, at least) that you didn't have to pay.
I don't know of any formal words that would imply staying rent-free, so you may just have to say it that (or a similar) way, maybe like this:
I had to cut expenses by moving out of my place and staying at friends' apartments, rent-free thanks to their graciousness.