Do you eat before going to bed? Do you think you need to have a full stomach to sleep? If possible, don't eat later than 2 hours before bed; but that may be a very hard goal for you right now.
If you absolutely, positively cannot sleep without something in your stomach, make some substitutions. Instead of ice cream have a cup of yogurt, or replace cookies or brownies with fruit or a flavored rice or popcorn cake. If it's salty potato chips or fattening snack goodies that are your bedtime downfall, crunch on pretzels or carrots or celery sticks with a little salt sprinkled on them. After awhile, you may be able to be less dependent on late-night snacks.
Better yet, snuggle up or make love with your partner or spouse instead of midnight snacking!