This is how I broke my son of the habit. I would allow him 3 nights of sleeping in a sleeping bag on the floor beside my bed. Then I laid down with him in his bed for 3 nights and we began a routine. I first read him a book, then lights out and I sang a song to him. After night three I read the book. Tucked him in and stood over him as we sang the song.... We kept that tradition up for some time as we both enjoyed it. I always told him the 3 day rule during each phase so nothing was a surprise. It worked beautifully ;)
We had to bed train our twin daughters at 4, every time one of them got up and came in our room we would get up and calmly put them back in their bed. It's exhausting but it worked after a week. Then I had my bed back.