Me not eating 5 hours before bed every night helped me to lose 40lbs in 4 months. When I started eating before bed I gained my weight back. It was hard for me to lose weight when I was eating 5 hours or less before going to sleep.
Never eat and then lay down! Wait at least 3 hours before napping. Don't eat 5 hours before bed. If you work an overnight shift then don't eat anything 5 hours before your shift ends or before going to bed if you are trying to lose weight or trying to prevent weight gain.