The tight black tank top beamed a signal to my smartphone, chronicling every data point about my breathing, heart rate and movement.
All while I slept.
By the time the sun came up, my phone had produced colorful charts showing every time my heartbeat quickened (interrupted sleep from 5:44 to 5:45 a.m.), the calories I burned tossing and turning (220) and the precise moment my breathing was most relaxed (4:28 a.m.).
These days, biometric sensors can be added to the fabric of just about everything we wear -- from shirts to shorts, hats to shoes, and everything in between. The smart shirt I slept in doesn't come cheap: The Hexoskin shirt and 2-inch-long power and recording module cost $400. For a lot of us, that makes the Hexoskin and products like it interesting novelties. But for other people, including professional athletes, the information may be worth the price.
"You buy this shirt because it gives you data about yourself that you can't get anywhere else," says Pierre-Alexandre Fournier, CEO and co-founder of Montreal-based Hexoskin.
Welcome to the world of sensor-enhanced clothing, which promises to put a whole new spin on dressing smart.
Ralph Lauren claims its Polo Tech shirt, available later this summer, will track distances, workout intensity and even promote muscle recovery. Rest Devices' Mimo onesie sends data showing your baby's breathing, temperature and sleep patterns to your smartphone. China's sports apparel maker 361 Degrees is developing kids shoes with GPS trackers.
And French company Emiota is working on Belty, a smart belt that automatically adjusts to accommodate changing waistlines. It even offers something called "waistline trend analysis," essentially shaming you for packing on the pounds. Companies are also fashioning socks that help people in physical therapy improve their gait and clothes that remotely monitor the vitals of elderly patients.
Intel touted an array of intriguing products in a "Make It Wearable" competition it held last year. And in January, the company showed off a jacket that helps a visually impaired employee sense what's around him.
Right now, the smart-clothing market is tiny, says market research firm IDC. That's expected to change within the next four years, jumping from 200,000 items shipped worldwide this year to 5.6 million items by 2019.
Well, well, well
Because smart textiles are worn next to your heart and lungs, they could produce more accurate -- and more kinds of -- data than smartwatches or smart eyewear (like Google Glass). That may make them ideal for monitoring our fitness and stress levels.
Hexoskin's biometric shirts, for example, have been used by Cirque du Soleil to check its artists' fatigue levels. NASA crew members wear them on simulated missions to Mars. Researchers find them useful for studying sleep and understanding the effects of air pollution. And athletes and sports teams turn to shirts made by Athos, OMsignal as well as Hexoskin to track workload and fatigue.
While health and wellness will likely be the primary reasons to put on smart shirts and hats for now, many companies hope to one day appeal to every kind of buyer.
"Our real passion and vision is to be seamlessly and non-intrusively woven into consumers' lives," says Omri Yoffe, CEO of LifeBeam, an Israeli maker of intelligent head gear, including bike helmets, hats and visors for consumers. It also makes biosensing helmets and gear for pilots, military special forces and emergency first responders.
But reaching the mainstream market won't be easy.
"Is it going to make its way out to mainstream USA for soccer moms and other people?" asks Ramon Llamas, an analyst with IDC. "Not anytime soon."
For starters, wearable gear isn't cheap. Such products also require bulky removable modules to power the sensors woven into clothing -- although those modules could eventually disappear when our movements or the sun take over power duties. And unlike smartwatches -- which can download new apps -- a piece of smart clothing isn't likely to get more intelligent after you've bought it.
"No one's going to download a Facebook app for their shirt," says Llamas.
A few days after my data-filled snooze, I wore the Hexoskin shirt for a run around the neighborhood. The instant I accelerated from a walk to a jog to a run, my iPhone 6 lit up. A thin, red line cataloging my heartbeat snaked up a chart showing beats per minute: 80 beats, then 134 and on to 160 beats per minute. My breath rate and calories burned bounced higher, too. The red line kept rising as I ran, peaking at 172, until I slowed to a walk and watched my heartbeat take a leisurely slope back down to under 100 beats per minute.
I received a tidy set of stats after finishing my 12-minute run (I don't run much): 134 average heartbeats per minute, 30 average breaths per minute, 1,341 steps, 147 calories burned.
Another day, I wore both the shirt and LifeBeam's smart hat as I walked along a lakefront trail in Rockefeller State Park Preserve in Pleasantville, NY. I toggled between two smartphone apps tracking my every movement: Hexoskin's showed my heart rate, calories and breathing; the hat transmitted my heart rate to Apple's Health app.
It's not hard to imagine more people becoming interested in this kind of gear, especially if manufacturers can cut prices and shrink the size of the power sources. For now, smart clothing is like designer wear: pretty, expensive and maybe too precious for everyday wear.
But in the future, says Hexoskin's Fournier, "people are going to have smart clothing and they're not going to think about it."
This story appears in the summer edition of CNET Magazine. For other magazine stories, go here.