The effects of stimulants can vary based on the individual's metabolism, age, and sensitivity. As a general guideline, it is recommended to avoid consuming stimulants at least 4-6 hours before bedtime. For individuals who are particularly sensitive to stimulants, it may be necessary to avoid them even earlier in the day to ensure they do not interfere with sleep.