i dont know for sure but its not good to let them do it for too long as the blood does rush to the brain n i heard that it can cause vessels in the eyes n nose (thats why sometimes they can get nose bleeds) stuff too burst from all the pressure of being upside down...
my ds does the same thing all the time i just try and get him to do something else like distract him or show him something i know will take him away from it