yup thats it.
no but seriously when you sit some way, which makes your leg go to sleep in the first place because the position you were sitting in made it hard for the blood to circulate. and when you get back up, and start moving it around due to uncomfortableness, the blood starts circulating...