What age should children no longer be able to sleep in bed with parents/parent?

AR

My 3 yr old likes to get in my bed in the middle of the night. My husband works nights so it’s not like there’s anything adult going on in here. I still think it’s a little controversial because my nephew slept in his grandparents’ (they raised him) room until he was like 7 or 8. So what age do you think is the cut off?