The lying down animation can only be accessed via packets. The logic behind it would be to spawn a human with all the key of the player (so it transfers the skin, etc) and then onPlayerSpawn remove the human.
If you dont want to deal with packets, this may do it for you.