The time before bed is a VITAL time to eat something - otherwise, during the all-impostant "rebuilding" part of the day while your body is resting there is no fuel or energy to properly rebuild.
Rather than depending on a random rule about when to stop eating, focus on WHAT to eat. Fuel your body for the upcoming demands. You will be sleeping - so give your body some food that will give it energy, but slow burning energy. No startchy carbs (fast energy, not necessary when sleeping). Think fats and protein.
Pre-bed meals *can* include carbs, but be smart about them. Something like cottage cheese and walnuts/almonds, protein shake (not just whey) and peanut butter, apple and peanut butter, etc.