Recent data suggests that melatonin, a supplement available over the counter, may help prevent delirium in hospitalized patients. The investigators are hypothesizing that melatonin may help in delirium prevention by improving sleep quality and possibly circadian rhythm cycling in patients who are given the supplement. This pilot study involves a randomized placebo-controlled design in which participants will be randomized to receive either melatonin 3mg orally or placebo orally. Participants in both groups will be fitted with wireless actigraphy devices to obtain objective sleep quality, and will also receive a sleep questionnaire each morning to obtain subjective data on their sleep quality overnight. Delirium will be assessed by floor nurses twice daily using the Confusion Assessment Method (CAM).