When I was a kid, topping 'n tailing was what my sister and I did when too many rels came to visit. Aunt X would take one of our beds, and my sister would sleep in my bed, with me. She'd have a pillow at the foot of the bed, so her legs were pointing towards my head & vv.
I've also done it in a sleeping bag while tramping (bushwalking/hiking), when there were too many people in the hut for everyone to have a bunk for themselves. And at house parties (usually byo sleeping bag ones, again).
I have a feeling that doesn't happen as much, these days. Enlighten me, anyone?
ETA In addition to not talking about babies, I'm also NOT talking about doing things to beans or gooseberries, or washing adult bottoms and tops in lieu of showers/baths, Just sleeping arrangements. I've had some interesting replies, but please feel free to add.