No one can really answer that. Some kids are extremely close to their grandparents - or even closer than their parents. It's also complicated by the fact that they're different sexes.
As I said, there's no hard and firm answer and even the experts don't agree. My personal views are:
- If they're opposite sexes, it should definitely end well before puberty. If they're same sexes, it should end around puberty or soon after, although it doesn't make me as uncomfortable if they are forced (because of a hotel room with only one bed or whatever). This applies for all adults.
- If the child starts to express awkwardness, I would think it should end. This applies for all adults.
- I'm personally a little less comfortable with anyone but parents (or much older siblings of the same sex) sleeping with the kids, although there are certainly circumstances where a grandparent is very close.
- I'm uncomfortable with siblings of the opposite sex sleeping together if either of them is at or past puberty.
- All of this applies to the middle class, American, Judeo-Christian upbringing I experienced. Other cultures see it differently.
But none of that is really very helpful because it's only one person's opinion. It's a very personal matter. I would simply let the situation be the guide. If the kid's uncomfortable, I'd try to address it, but very gently since it is a personal matter and there's no firm rule.