I am wondering about a movie I saw as a kid, its animated, probably made between 1980 and 1994, about a boy that travels on his bed to another land. I think the bed lands in a swamp at first, and there is a black gooo that comes to attack a castle at the end.

It could have been Japanese, but I'm not sure, I saw it in english...

If you know what I'm talking about, please let me know!