Niboru and the Dream Machine

Niboru and the Dream Machine is a Japanese children's comedy fantasy suspense OVA that was animated by Toei Animation and aired on Fuji Television in spring 1987. This OVA was based on an obscure children's picture book of the same name that was released in 1979.

Plot
Niboru is a normal 8-year-old kid who always is unlucky, gets into trouble and gets bullied by his friends a lot. But one night, he finds a machine that can let Nobu dream about anything he wants, but then, he and his friends get sucked into a dream and has to go one a long adventure to get back into the real world.