On long flights, some of the crew are rotated out and go into a crew rest space to sleep. It's above the cabin. It can be accessed, believe it or not, by a hidden staircase. Video here: https://www.youtube.com/watch?v=1venL93QmXA It's really interesting.
So what you were probably noticing was the pilots and crew rotating into the rest space and returning to duty after a few hours.
That's interesting, I didn't see anyone go the other way back to the cockpit during the exit to the back.
(post is archived)