If you have an attack, you can use your inhaler before bed, but keep it near you. Sit up first so the medication can easily enter your throat and lungs when you take your inhaler. Then, wait a little while to ensure the medication works before lying down and returning to sleep.