Sometimes my best ideas come to me around bed time- right before I fall asleep or right when I wake up. One thing that I have learned is if I do not write my idea down immediately, I forget it. So, I started keeping a notebook by my bed. If you do not do this, you should. An article in Psychology Today describes how you can put your mind to work before sleep. They suggest that you should think about the scenario you are trying to address before you fall asleep and ask your mind to solve the problem. I have tried this with mix results. Sometimes I am shocked I came up with a certain solution or idea and other times I don’t have that same success and find myself lying in bed most of the night thinking about it. You need to ask yourself if putting your mind to work is worth it (or you just need to make sure you have the skills to put yourself back to sleep).
In the meantime, if you are looking for something by your bed that is small to hold your notebook this is what I use:
BedShelfie Wooden Bedside Shelf for Bed & Bunk Bed Shelf Tray Table Caddy Top Bunk Organizer As Seen On Business Insider College Dorm Room Essentials Clip-On Nightstand (Original Size, Grey Bamboo)