Pillows that track your snoozing patterns? A bed that adjusts based on how much you twist and turn? Companies are adding more technology into their products, hoping to lure customers craving a better night’s sleep. Some specialized businesses are making gadgets that promise to measure and improve the quality of slumber, while mass-market retailers like…