WebInfer

3.4 / 5

Mattress Mode

Phone on mattress detects movement, analyzes sleep quality

Useful
Zero Cost
Privacy

The Problem

Sleep tracking requires expensive devices or uncomfortable wearables

Current Solutions (Not Great)

Oura ring ($300+), Whoop ($30/mo), Apple Watch (wear to bed), dedicated mattress sensors

Who Needs This

Health-conscious people, those with sleep issues, quantified-self enthusiasts

Sleep trackers either require wearing something to bed or cost $200+ for a dedicated device. Mattress Mode uses your phone's accelerometer to detect sleep movements when placed on the mattress beside you. It tracks when you're restless, estimates sleep phases, detects potential issues like sleep apnea patterns, and wakes you during light sleep. No wearable, no subscription, no uploading your sleep data to the cloud.

Honest Take

Sleep tracking market is super saturated with apps, wearables, and smart mattress pads. Accuracy will be questionable compared to actual sensors—accelerometer on mattress can't really match wrist-worn devices or bed sensors. Privacy angle is good but probably not enough to overcome accuracy concerns.

Monetization Ideas
Ways to turn this into revenue

Freemium

Free basic, $5-15/mo for pro

One-Time Purchase

$9-49 per license

Subscription

$5-29/month or $49-199/year

Features
Key features that make this app valuable
  • Movement detection via accelerometer
  • Sleep phase estimation (light, deep, REM)
  • Sleep quality score
  • Smart alarm (wake during light sleep)
  • Snoring/sound detection
  • Sleep trends over time
  • Bedtime reminders
  • Sleep environment suggestions
Build Prompt
Use this prompt with an AI assistant to start building
Build a React PWA called 'Mattress Mode' using WebInfer and DeviceMotion API. UI: bedtime setup screen (alarm time, goals), overnight display (minimal, dark), morning report. On sleep start: acquire Screen Wake Lock, begin DeviceMotion sampling at 1Hz. Store acceleration magnitude over time. Detect movement epochs (>threshold = restless, <threshold = still). Optionally use getUserMedia for audio to detect snoring via Web Audio API amplitude analysis. On alarm window (30min before target): if movement detected (light sleep), trigger alarm via Notifications + audio. Morning: use generateObject to analyze night data and return { sleepScore: number, totalSleep: string, timeToSleep: string, phases: [{ phase: 'awake'|'light'|'deep'|'rem', start: string, duration: string }], disturbances: number, snoringDetected: boolean, insights: string[], suggestions: string[] }. Visualize sleep phases as timeline. Track trends in IndexedDB. 'Sleep debt' calculation over weeks.
Score Breakdown
Pain
Clarity
Demo
Build
Share
Revenue

Ready to build?

Copy the build prompt and start creating with your favorite AI assistant.

Built it?

Submit your creation to our showcase and inspire others.

Submit to Showcase