I'd advise to always have a notebook next to your bed in any situation - for getting thoughts out of your head in a general sense like this, writing down work ideas [I always get sparks of inspiration just before falling asleep], writing down dreams if that sort of thing interests you.