My cellphone has a notepad application in it and I have it set in a shortcut key. It has always helped me with those random ideas and things not to forget.
No iPad to bed? Heh, I s'pose the best thing you could do for yourself is prop a desk up in your room fully equipped with a lamp, pencil, paper, milk, and cookies!
I have one of those small keychain voice recorders, just for such instances. Mostly used for remembering what groceries to pick up at the store, but also handy for random thoughts.