The Secret Ending is found by locating all five Jellyfish, activating the symbol in the final level, and then heading to the large symbol to the left of the roof in the final level. From there, you're teleported into the Spaceship, where you can find Seccom Masada-sensei playing the piano. To complete the secret ending, you must complete the song he's playing using the Flute Effect (needs specific inputs). Once successful, the door on the right will open, where Madotsuki can sleep in the white bed, completing the ending.