This episode is from the Hindu mythology about how King Trishanku  was stranded upside-down in his own heaven.