Our cat follows the same procedure EVERY night and has done for years - she didn't do it when we first got her and I can't remember when she started, but it has been like this a very long time. She will always already be in the bedroom when we come up to sleep and once we get into bed she will position herself between us at about knee level and seemingly goes to sleep. However after 15-20 minutes, it is almost like she decides that we're now safely asleep (even though I'm not) and her job is done, so she gets up and leaves the room.
We're not 100% sure where she goes after that; sometimes I hear the cat flap go about a minute or two after she leaves, but most of the time it doesn't. She does have various places around the house that she sleeps at points during the day, so I presume she uses those overnight. Then she'll come and sleep with us again sometime around 5am, usually without waking us (unless she has a "gift" to bring us) but with the expectation that we'll get up at our normal time and give her breakfast - if it looks like we're sleeping in past that, she'll start to get a bit antsy and let us know that's she's getting hungry!