I was having a morning WhatsApp chat with my daughters the other day when No.2 mentioned that she had missed the Perseid showers the night before but had dreamt it and it was amazing, so was that the same? It was just an offhand comment but of course it mentioned dreams and the mind so that set me off. I told her certainly it's a good substitute, because when you imagine something, to some parts of your brain it is the same as if it really happened. In fact, imagining something can actually change both your mind and your body in measurable ways.
Admiring the wiring
How does this work? Well first consider what the brain is. A box inside your head, in a dark shell, that interprets signals coming in from your external senses. It combines them all together to make one unified experience of reality for you. But these are really just electrical and chemical messages, encoded to the language of neuronal and synaptic interactions and sent to the front part of your brain to validate and accept as reality. Your imagination can replicate these firing neurons to a good standard, better if you practice it, so that emotions can also be evoked and other parts of the brain take it as 'red'. It did actually happen, so they react accordingly and you get the 'experience'. The only thing that stops you believing it is the parts of your brain (most likely pre-frontal cortex, the thing that inhibits you from actually acting out some of the crazy ideas you have.. you know the ones...) which is there to help you cross-reference and interpret all those senses and say, 'Hang about, what's the provenance of all this activity in my head? Is that really a marshmallow or a pillow?'