Midnight Mastermind

Woke up in the night,
had all my problems solved.
But by the morning light,
my solutions had dissolved.