Had sex lastnight but when my husband got up his sperm came out did some of it stay inside me and why does some of it come out.?

Normal. Semen usually escapes after sex. You probably havn't noticed it before because you either go to the bathroom, shower or bathe afterwards.Or else your husband's semen remains in the vagina for a while trapped by the labia and vaginal "mouth" is closed. The only part of semen that remains in a woman after sex is any sperm that go up thru the cervix and into the uterus, the rest escapes.Don't worry.
Glass of water. Law of gravity. When you are up, sperm comes down. Like a glass of water if you tip it over, most of it comes out, some of it stays inside.