You can eat onion at night but you need to be cautious. Onions can create gas in your stomach and can interrupt your sleep.