How many NASA engineers does it take to change a lightbulb?

How about if they're changing 85 lightbulbs? What if the bulbs they're replacing are on the International Space Station (ISS)? What if it's rather urgent, because the old bulbs are rapidly burning out? And what if the replacements are a brand-new technology, meant not only to illuminate, but also to help astronauts sleep more?

Those questions are no joke to NASA, which is investing $11.4 million to change out aging fluorescent lights in the ISS's U.S. Orbital Segment. When NASA began considering the replacements, doctors realized they had an opportunity to address an entirely different problem: astronaut insomnia.

Indeed, sleep deprivation is a serious problem in space—severe enough that sleep meds are the second-most common drug taken by astronauts after painkillers, according to NASA medical officer and flight surgeon, Smith Johnston. Although their schedule allows for 8.5 hours of shut-eye a day, astronauts average barely six hours—30 to 60 minutes less than they get on Earth—and that's with the help of pills, relaxation techniques, sleep hygiene education and every other tool Johnston has thought up. Most people can sustain such sleep deprivation for several days, but over the course of months, "it adds up," Johnston says.

There's no single reason why astronauts often go months without a good night's sleep. Johnston says it's a combination of the unearthly sensation of floating in bed, constant noise, variable temperature, poor air circulation, nagging backaches and headaches, frequent shifts between Houston and Moscow time zones, and a new dawn every 90 minutes that confuses surface-accustomed circadian rhythms.

That's a grave concern for NASA: Sleep deprivation makes us fuzzy—an annoyance on Earth, but plain dangerous (and if a mission is botched, plain expensive) in space.

NASA hopes to fix at least part of the problem—the disruption of normal circadian rhythms—with new lamps.

The concept is based on research showing that our bodily clocks are wound by light exposure. About a decade ago scientists discovered a new type of light-sensitive cell in our eyes—an extraordinary find, considering they'd been peering at rods and cones for centuries and never noticed that the nearby retinal ganglion cells were, in a way, peering back. But the cells have no role in vision. Instead, they inform our brain's pacemaker, the suprachiasmatic nucleus, what time it is, which in turn cues thousands of schedule-sensitive bodily processes.

Sleep scientists have found that when these receptors are exposed to a particular wavelength of blue light—incidentally, sky blue—we feel more alert, because the brain suppresses melatonin, a key hormone in regulating sleep. In contrast, red-spectrum light allows the melatonin to flow.

The new lamps aim to exploit this chronobiology. The fixtures, which must fit in the exact footprint of their predecessors, comprise a rainbow of more than 100 LED bulbs cloaked by a diffuser, so they appear to be a single panel of white light, says Debbie Sharp, a senior manager at project contractor Boeing.

The fixtures have three modes, each with a subtly different hue: White light is for general vision; a cooler blue-shifted light promotes alertness (useful in the morning, during mid-sleep emergencies or amidst the schedule shifts that regularly slam their 24-hour rhythms from Houston time to Moscow time); and a warmer red-shifted light triggers sleepiness (helpful at bedtime). And LEDs have the additional bonus of being lighter, cooler, more durable, less toxic and more energy-efficient than fluorescents.

Boeing and its subcontractors, who are still tinkering with the final design, expect to deliver 20 lamps in 2015—right when the station will be down to its last spare bulbs. In the meantime the National Space Biomedical Research Institute has funded the labs of neuroscientists George Brainard at Thomas Jefferson University and Steven Lockley at Harvard University to test the lamps' efficacy. Brainard is studying whether the lights indeed help people in simulated ISS sleeping quarters doze off faster. Lockley is investigating whether the lights—in combination with caffeine—help volunteers perform complex tasks during night shifts.

"We're sure they'll have an effect—we just want to see what kind of effect they'll have, and the size of the effect," says study collaborator Elizabeth Klerman of Harvard Medical School's Division of Sleep Medicine.

Klerman predicts the technology will one day be widespread back on Earth, perhaps illuminating hospital rooms, nuclear submarines, factories, classrooms or "basically anywhere you have indoor lighting and want people to be alert at certain times," she says. "Just because the world has been using fluorescent lighting for years doesn't mean it's the best."