I work from home. I like it. However, it’s easy to get distracted and slack off.
I find that the longer I spend with my workplace set up in one location at home, the less productive I get. I seem to come to associate that spot with being distracted, instead of working.
So I move regularly. Spend a few days/weeks with one workplace, then move to another in my home. Or spend a week going out to a coffee shop every day to work there. It breaks the association and lets me get things done.
Works for me, anyway.
My experience working in offices indicates that the peer pressure of other people being around working balances out the accumulated slacking habits of a single desk. Still, given the choice I’d rather work at home and have to move around.