I let AI build a tool to help me figure out what was waking me up at night

An experimenter used an AI coding agent to build a home‑sensor and audio system that correlates nighttime noises and environmental data with smartwatch sleep metrics, in order to pinpoint what was waking them up. Commenters are split between appreciating the “disposable software” approach for personal tooling and criticizing it as over‑engineered compared with simpler options like continuous audio recording, earplugs, or white noise machines. The exchange broadens into sleep science and hygiene — touching on biphasic sleep, cortisol and histamine spikes, CO₂ buildup, and the limits of consumer sleep trackers — as people compare technical fixes with lifestyle and health interventions.

Perceived Overengineering vs Simple Fixes

  • Many feel the setup (sensors, dashboards, AI-written code) is excessive for discovering that city noises wake someone at night.
  • Suggested simpler alternatives:
    • Record whole nights on a phone or laptop and inspect spikes.
    • Use a circular-buffer CLI recorder triggered when the person notices waking.
    • Use existing sleep/noise apps that record above a threshold.
  • Others defend the project as a fun, educational build and a way to really understand patterns rather than just guessing.

Views on Using AI as a Coding Agent

  • Some appreciate the “disposable/on‑demand software” angle: AI makes one-off personal tools more feasible.
  • Others criticize “I have a problem → use AI” as wasteful and cliché, arguing that datacenter resource use isn’t justified for trivial problems.
  • A few suggest AI would have been better used just to suggest an off‑the‑shelf app or a much simpler script.

Noise, Sleep Quality, and Mitigations

  • Several report similar experiences: unnoticed night noises correlate with wakeups or restless sleep, even when people don’t remember waking.
  • Common practical fixes:
    • Earplugs (foam, silicone, custom‑molded, wax) and/or white/brown noise machines, fans, or AirPods with ANC.
    • Better window insulation, acoustic panels, or moving to quieter environments.
  • Some find white noise or even very loud construction oddly more sleep‑friendly than intermittent moderate noises.
  • Concerns raised about comfort, earwax buildup, ear infections, tinnitus, and not hearing emergencies; others say decades of nightly use have been fine.

CO₂ and Bedroom Environment

  • Many focus on the reported ~3000+ ppm CO₂ as “severely high” and likely harmful to sleep quality, suggesting more ventilation or continuous exhaust fans.
  • Debate over plants: widely liked aesthetically, but commenters note studies indicating they barely affect indoor CO₂/VOCs at realistic densities.
  • Tension noted between noise/heat insulation (tight, quiet rooms) and adequate fresh air.

Sleep Physiology and Alternative Explanations

  • Multiple commenters note that consistent ~3am wakings can be linked to:
    • Cortisol spikes and stress/anxiety.
    • Histamine/MCAS patterns (nighttime mediator peaks).
    • Digestive issues or hunger.
    • Possible obstructive sleep apnea; some recommend a sleep study.
  • Others mention “biphasic”/segmented sleep as a historically common pattern, though there is debate over how relevant that is here.
  • Several argue that obsessing over sleep tracking itself can worsen insomnia; others say breathing exercises, meditation, exercise, and routine helped more than environment fixes.

Wearables, Data Quality, and Tools

  • Skepticism about watch sleep-stage accuracy, especially for some brands; wake events around noises may be misclassified.
  • Some praise alternative watch brands for openness and long-term support; others raise security concerns with particular vendors.
  • Overall, many like the idea of correlating sleep data with environment, but question the precision and practical payoff.