For the sake of completeness (although I think accepted answer The Number of the Beast is the most all-encompassing of Heinlein's "multiverse" novels), I'll throw in The Cat Who Walks Through Walls.
It weaves together characters and storylines from a variety of other Heinlein novels, most prominently The Moon Is A Harsh Mistress and Time Enough For Love.
In spirit and tone, though, it functions as a sort of sequel to The Number of the Beast. Not for reasons of any narrative continuity between the two, but because each is a freewheeling parodic adventure within the conventions of a particular genre. Where Beast was primarily a romp through the conventions of pulp sci-fi. The Cat is Heinlein at play with the tropes of hard-boiled detective fiction. Flawed tough-guy hero, mysterious femme fatale, inexplicable murder to open the action - it's all swiped from the noir playbook.
Finally, the spacetime-travelling fictional-world-visiting Gay Deceiver from Beast also makes a reappearance in To Sail Beyond The Sunset, but there it's more of a walk-on cameo at the end.