That’s a very good question. I would like to know the answer too! Because I build robots I have thought about a similar question – in order to make really really intelligent robots would we have to give them the ability to dream? Surprisingly the answer might be yes. We are already building some robots that have a computer simulation of themselves, inside themselves – it’s a kind of artificial imagination. It’s so that the robot can simulate what it’s going to do next before actually doing it – and so therefore not making a serious mistake and damaging itself or something (or someone) else. So if robots can have an imagination then, in a sense they should be able to dream too.
Although I haven’t answered your question I hope this helps a little.