This is why sleep studies are conducted in clinics, not left to patients to self-report. they want accurate data? They will need to conduct a real study, portion the meals out themselves, give people a schedule.
take-home sleep studies are common for sleep apnea, are they not? I did one...
Such studies do exist - randomized feeding trials. In these studies the participants are provided all meals and snacks, and sometimes are under constant surveillance for weeks and sometimes months on end.
https://pubmed.ncbi.nlm.nih.gov/39134209/
Obviously such studies are far more invasive and expensive to run than the classic "fill out of a survey" observational study [1], so they tend to be the outliers. But they exist and have incredibly useful results.
[1] There is a widely cited nutritional survey vehicle called the Nurses' Health Study, and it is the foundation of countless largely disposable nutrition clickbait results. This survey-based observation has been used to prove that meat is bad for you, and good for you. That artificial sweeteners make you thinner, and fatter. And on and on. That single "every now and then try to remember the kinds of things you ate over the past period of time" survey is the root of an incredible amount of noise in nutrition science.