# Sleep in mammals

> Daily total and REM sleep, sleep-cycle length, brain and body weight for 83 mammal species, from Savage & West (2007) via ggplot2's msleep.

- Source: [Savage & West (2007), PNAS](https://doi.org/10.1073/pnas.0610080104)
- Citation: Savage VM, West GB. A quantitative, theoretical framework for understanding mammalian sleep. Proc Natl Acad Sci USA. 2007;104(3):1051–1056. doi:10.1073/pnas.0610080104
- Sample: 83 mammal species
- Coverage: 83 mammal species across 19 orders; measurements compiled from laboratory and captive-animal sleep studies published up to 1989
- License: The msleep file is distributed with ggplot2 under the MIT License (Copyright (c) 2025 ggplot2 core developer team), https://github.com/tidyverse/ggplot2/blob/737be17f43bebac02ccb119753c1fee267572443/LICENSE.md. The measurements themselves are factual data compiled from published papers (Savage & West 2007, who took sleep times from Zepelin 1989 and body/brain masses mainly from Meddis 1983).
- Retrieved: 2026-10-14
- JSON (all tables): https://karelbusta.dev/data/sleep/datasets/mammal-sleep.json
- CSV, Sleep by species (83 rows): https://karelbusta.dev/data/sleep/datasets/mammal-sleep/species.csv
- CSV, Bigger mammals sleep less: log-log fit (2 rows): https://karelbusta.dev/data/sleep/datasets/mammal-sleep/allometry.csv

## Tables

### Sleep by species

One row per species (83). Values exactly as in ggplot2's msleep.csv (Savage & West 2007 sleep times and weights; order, vore and conservation added by ggplot2 from Wikipedia). Empty = not reported.

| Column | Type | Unit | Description |
| --- | --- | --- | --- |
| name | string |  | Common name as given in the source. |
| genus | string |  | Genus as spelled in the source (some spellings are non-standard, see dataset caveats). |
| order | string |  | Taxonomic order (added by ggplot2 from Wikipedia). |
| vore | string |  | Source code: carni, herbi, omni, insecti (added by ggplot2 from Wikipedia). |
| conservation | string |  | Source code, IUCN-style: lc, nt, vu, en, cd (conservation dependent), domesticated (added by ggplot2 from Wikipedia; not current IUCN data). |
| sleep_total | number | h/day | Total sleep time per 24 h. Cetaceans: halved by Savage & West for unihemispheric sleep. |
| sleep_rem | number | h/day | REM sleep time per 24 h. |
| sleep_cycle | number | h | Length of one NREM-REM sleep cycle. |
| awake | number | h/day | Time awake per 24 h (ggplot2: 24 minus sleep; see caveats for 2 rows that sum to 24.05). |
| brainwt | number | kg | Brain mass. |
| bodywt | number | kg | Body mass. |
| note | string |  | Processing note from the primary paper, where relevant. |

### Bigger mammals sleep less: log-log fit

Ordinary least squares fit of log10(total sleep, h/day) on log10(body weight, kg), computed by build.ts from the species table. sleep ≈ sleep_at_1kg × bodywt^slope.

| Column | Type | Unit | Description |
| --- | --- | --- | --- |
| model | string |  | Which species were included. |
| n | number |  | Number of species with both total sleep and body weight. |
| slope | number |  | Scaling exponent: change in log10(sleep) per unit log10(body weight). |
| slope_ci_low | number |  | Lower bound, t distribution with n−2 df. |
| slope_ci_high | number |  | Upper bound, t distribution with n−2 df. |
| intercept | number |  | log10 of predicted total sleep (h/day) at 1 kg. |
| r2 | number |  | Share of variance in log10(total sleep) explained by log10(body weight). |
| sleep_at_1kg | number | h/day | 10^intercept. |
| ratio_per_10x_mass | number |  | 10^slope: predicted sleep multiplies by this for every tenfold increase in body weight. |

## Caveats

- Almost all values come from EEG recordings of captive or laboratory animals; sleep in the wild can differ a lot.
- Wild brown-throated three-toed sloths slept 9.63 h/day on EEG, over 6 h less than previously reported in captivity (Rattenborg et al. 2008); msleep lists 14.4 h.
- Dolphin, pilot whale and porpoise totals were halved by Savage & West because these whales sleep one brain hemisphere at a time; they are not behavioural sleep times.
- Diet (vore), order and conservation status were added by ggplot2 from Wikipedia around 2015, not by the paper, and conservation codes are not current IUCN assessments.
- Some genus names are misspelled in the source (Capri, Cavis, Haliochoerus, Nyctibeus) and are kept as published.
- Pilot whale and common porpoise: sleep_total + awake = 24.05 h, so one of the two is rounded.
- Values were not cross-checked against the paper's supplementary Table 1, which could not be downloaded (see Methodology).

## Methodology

## What was measured

Savage & West (2007) compiled daily sleep for 83 mammal species to test a metabolic-scaling theory of sleep. Per their
Methods, all sleep data (total sleep, REM sleep, sleep-cycle length) come from Zepelin's compilation (Zepelin 1989, in
*Principles and Practice of Sleep Medicine*, 2nd ed.), which aggregates EEG/behavioural sleep studies, almost all of
animals in captivity or the laboratory. Body masses come mostly from Meddis (1983), with Smith et al. (2003) and
Nowak (1991, *Walker's Mammals of the World*) used when a value was missing; brain masses come from Meddis, with two
values excluded because their sleep values did not match Zepelin's. They also:

- divided total sleep by two for the bottlenose dolphin (*Tursiops truncatus*), pilot whale (*Globicephalus scammoni*)
  and harbour porpoise (*Phocoena phocoena*), because these cetaceans sleep with one hemisphere at a time;
- excluded REM data for the dolphin and porpoise, REM and cycle length for the Asian elephant (flagged doubtful in
  the source), and the 0.0 REM value for the short-nosed echidna.

The ggplot2 maintainers published these values as the `msleep` dataset ("an updated and expanded version of the
mammals sleep dataset", the original being Allison & Cicchetti 1976, *Science* 194:732–734) and added order, diet
(`vore`) and conservation status from Wikipedia.

## Source file

`apps/data/ingest/mammal-sleep/fetch.ts` downloads `data-raw/msleep.csv` from tidyverse/ggplot2 pinned at commit
`737be17f43bebac02ccb119753c1fee267572443` (5,993 bytes, sha256 `6589d852…d7cd3`; full hash in `manifest.json`). The
file has not changed since commit `72122706` (2015-06-17). The paper's own supplementary Table 1
(`pnas_0610080104_10080Table1.xls`) is listed on PubMed Central but could not be fetched by script (reCAPTCHA on PMC,
HTTP 403 on pnas.org, not in the Europe PMC open-access subset, no Wayback snapshot), so the msleep values were not
cross-checked row by row against it.

## Processing

`build.ts` reads the committed CSV, checks its sha256 against the manifest, and writes two tables:

- **species**: the 83 rows with every number exactly as in the CSV (`NA` becomes empty/null). The only change is
  trimming surrounding whitespace in text fields (the source has `"Vole "`). A `note` column marks the three
  cetaceans whose sleep was halved.
- **allometry**: an ordinary least squares fit of log10(total sleep, h/day) on log10(body weight, kg), with a 95%
  confidence interval for the slope from the t distribution (n − 2 degrees of freedom). Over all 83 species the slope
  is −0.103 (95% CI −0.130 to −0.075), R² = 0.40, i.e. each tenfold increase in body weight goes with about 21% less
  sleep, from roughly 10 h/day at 1 kg. Dropping the three halved cetaceans barely changes it (slope −0.096, n = 80).
  This matches the paper's statement that the data "give an exponent for t_S of −0.1"; Savage & West's headline
  slope of −0.16 is for the ratio of sleep to awake time, not total sleep.

Body weight explains only about 40% of the variation (on the log scale): species of similar size can differ by
several hours, and diet, predation risk and sleeping site all matter.

## Built from this dataset

- Ranking: [Which animals sleep the least?](https://karelbusta.dev/data/sleep/animals-that-sleep-the-least)
- Ranking: [Which animals sleep the most?](https://karelbusta.dev/data/sleep/animals-that-sleep-the-most)
- Fact: [The bigger the mammal, the less it sleeps](https://karelbusta.dev/data/sleep/bigger-animals-sleep-less)
