I joined you guys just to find this cartoon movie title, so please help me:)

It's about one village/town and creatures existing in one sleeping man's dream.And they are having this regular eartquakes and they realised it's bacause the man is actually sneezing/snoring.And they build some kind of monolitic portal to travel into the 'real world' to make sure the man doesnt wake up.Its really visually colorful and bright neon colors are used a lot.I remember that in the final mission there are some flying pink elephants, with clouds made of cotton.And there were same flamingos too.
its driving me nuts, I want to find it so bad.
thank you guys a lot.