If you’re lying in bed for more than 20 minutes, it’s way better to get up than to force yourself to keep lying there. Your bed should be just for sleep (and sex). You don’t want to build an association between bed and restlessness. If you can’t fall asleep, leave your bedroom (or, if you’re in a studio apartment, your bed) and do something quiet and relaxing in dim light. Go back to bed only when you’re sleepy, and if you toss and turn again, repeat the process.