The 240 days starts from the day your authorized period of stay expires, which is nothing but end of your I-94 date or approval date on your approved petition.