My 9yo has currently been sleeping w/ me (most of the time) for several months now. He's afraid of dying in his sleep (we had some major heath issues), has nightmares most nights, and to cap it all off... I have to test his oxygen levels and pulse every 1-2 hours while he is sleeping (so he doesn't die in his sleep... it's not an irrational fear... although I play it down like crazy, he's coded twice this month), which just makes it about 1000x easier to have him sleep w/ me in "Mom's Magic Bed."
Prior to just recently... he'd sleep with me about half the time. This is pretty cumulative. Months would go by in his bed, while other weeks he'd spend half the time with me and half the time in his own, while other months he'd be mostly in mine. We did NOT start out cosleeping, although I'd intended on it (kiddo wanted his own space from day 1. He literally stretched before doing anything else the day he was born, and slept through the night for the first time ever at a few weeks old when I set him down in his crib for "just a moment". He didn't start piling into my bed with me until he was almost 4.
When I was a kid my parent's bed was "nightmares only". My best friend's parents she could pile in any time she wanted. I loved that sooooo much as a child (I'd sleepover, she'd sleepover) that I instituted HER family's rule in my own house.
There have been times I've wanted him in his bed for various reasons. We only ever had a problem for about 6mo waaaaaaaaaaaaay back years ago. Solved when kiddo was given the option to "start out in mine and be moved... or start out in his and allowed to come over". As soon as he had a chioce... easy peasy lemon squeezy.
Never had a problem at grandparents or other people's houses... but we've also had "Different Rules at Different Houses" pretty solid since he was about 2, AS WELL AS "You throw a fit, you don't get what you want". Not saying these 2 things would work for every kid... just that they worked for mine. My son will sleep anywhere, these days. Mom's bed, his bed, his bed at Nana's, with Nana or Papa in THEIR "magic bed", in the car, at friend's houses, hotels. Anywhere. By himself or with others.