I often wonder about the origins of certain common idioms of the "English" language. I mean what would happen if, when laughing really hard, my butt really did fall off? I wouldn't have any place left to stash my head.
There are books written on this subject. All languages have them I would think. The Germans have an interesting one. Ohne Gewehr. Without rifle, means without guarantee.
The saying comes from the British army. During their trek up the Nile to fight the Mahdi and his dervishes, the Egyptian camp followers would frequently laugh so hard that they would fall off their donkeys. The British soldiers mis-translared the Egyptian saying for this awkward descent from their steeds caused by excessive mirth.
The rest is history.