
The neuroscience of sleep and why everything you've been told about rest is backwards.
You're being productive while you sleep. Your brain is stronger after rest. Memory consolidation happens during REM sleep. Yet modern culture treats sleep as weakness—as wasted time that high-performers skip to get ahead.
This is backwards. Sleep is where the real work happens.
Sleep isn't passive. It's active restructuring. Your brain goes through distinct stages, each with specific functions.
Your brain transitions from wakefulness, starting to consolidate declarative memories (facts, events). Heart rate drops. Body temperature falls. This is your buffer zone.
Your brain slows dramatically. Growth hormone peaks. Physical recovery accelerates. Your glymphatic system—essentially your brain's cleaning service—becomes most active, flushing out metabolic waste (including beta-amyloid, which accumulates in Alzheimer's disease).
Without deep sleep, your brain literally doesn't clean itself. Toxins accumulate.
This is where everything gets weird. Your brain paralyzes your body (to prevent acting out dreams) while engaging in intense neural activity. REM sleep is when:
Here's what happens when you skip sleep:
After 24 hours without sleep: Your judgment and reaction time decline to the level of someone with a 0.10% blood alcohol level. You're legally drunk-equivalent.
After 48 hours: Emotional regulation collapses. You become irritable, anxious, prone to overreaction.
After 72 hours: Hallucinations begin. Your brain is literally malfunctioning.
Chronically (6 hours or less per night): You're at elevated risk for cardiovascular disease, obesity, diabetes, cancer, and dementia. Not "slightly elevated." 30-40% increased mortality risk.
The irony? People who sleep less think they're more productive. They're not. They're just executing old routines while their prefrontal cortex—the part that does creative thinking and good decision-making—is offline.
Want to learn something? Sleep on it. Literally.
MIT researchers found that people who napped after learning something new showed 40% improvement in performance compared to those who stayed awake. The nap wasn't wasted time. It was the actual learning happening.
A single night of poor sleep erases the learning from the previous day. Your brain reverses progress. All that studying? Gone.
Yet students pull all-nighters before exams. They arrive sleep-deprived and take a test on a neural system that's been deliberately broken. It's self-sabotage disguised as dedication.
You need sleep to be productive. But you're most "productive" (in terms of busyness) when you're sleep-deprived because:
You're not productive. You're just moving around faster while producing worse work.
Here's what the science says works:
Consistency matters more than duration. Sleeping 7 hours every night beats sleeping 5 hours, then 10 hours, then 6. Your circadian rhythm is the boss. Train it, respect it.
Temperature is critical. Your core body temperature needs to drop 2-3 degrees for sleep. A cool room (65-68°F) helps. So does a hot bath 90 minutes before bed (the subsequent temperature drop triggers sleepiness).
Light is your clock. Bright light in the morning resets your circadian rhythm. Blue light at night suppresses melatonin. No screens after 9 PM isn't advice—it's biology.
Caffeine has a 12-hour half-life. Coffee at 3 PM is still in your system at 3 AM. Most "insomniacs" are just caffeinated.
Every hour you steal from sleep, you're paying compound interest in cognitive decline. Your future self—the one trying to solve hard problems, make important decisions, create something—is broke because present you spent the sleep budget on busy work.
Sleep isn't recovery from work. Work is recovery from sleep. You sleep, your brain consolidates and repairs, then you're capable of actual thinking the next day.
The people who "hustle" hardest? They're usually the ones doing the lowest quality work while feeling the most exhausted.
# Heading
## Heading
### Heading
#### Heading
Hello World, **Bold**, _Italic_, ~~Hidden~~
```js
console.log('Hello World');
```
1. First
2. Second
3. Third
- Item 1
- Item 2
> Quote here
Internal links use the next/link component to allow prefetching and avoid hard-reload.
External links will get the default rel="noreferrer noopener" target="_blank" attributes for security.
[My Link](https://github.github.com/gfm)
This also works: https://github.github.com/gfm.MDX is a superset of Markdown, with support of JSX syntax. It allows you to import components, and use them right in the document, or even export values.
import { Component } from './component';
<Component name="Hello" />see MDX Syntax to learn more.
Useful for adding links, it is included by default.
<Cards>
<Card
href="https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating"
title="Fetching, Caching, and Revalidating"
>
Learn more about caching in Next.js
</Card>
</Cards>You can specify an icon to cards.
import { HomeIcon } from 'lucide-react';
<Cards>
<Card icon={<HomeIcon />} href="/" title="Home">
Go back to home
</Card>
</Cards><Cards>
<Card title="Fetching, Caching, and Revalidating">
Learn more about `fetch` in Next.js.
</Card>
</Cards>Learn more about fetch in Next.js.
Useful for adding tips/warnings, it is included by default.
<Callout>Hello World</Callout>Specify a callout title.
<Callout title="Title">Hello World</Callout>Title
You can specify the type of callout.
info (default)warnerror<Callout title="Title" type="error">
Hello World
</Callout>Title
Hello World
See all MDX components and available options.
An anchor is automatically applied to each heading, it sanitizes invalid characters like spaces. (e.g. Hello World to hello-world)
# Hello `World`The table of contents (TOC) will be generated based on headings, you can also customise the effects of headings:
# Heading [!toc]
This heading will be hidden from TOC.
# Another Heading [toc]
This heading will **only** be visible in TOC, you can use it to add additional TOC items.
Like headings rendered in a React component:
<MyComp />You can add [#slug] to customise heading anchors.
# heading [#my-heading-id]You can also chain it with TOC settings like:
# heading [toc] [#my-heading-id]To link people to a specific heading, add the heading id to hash fragment: /page#my-heading-id.
We support YAML frontmatter. It is a way to specify common information of the document (e.g. title). Place it at the top of document.
---
title: Hello World
---
## TitleSee Page Conventions for a list of properties available for frontmatter.
Syntax Highlighting is supported by default using Rehype Code.
```js
console.log('Hello World');
```You can add a title to the codeblock.
```js title="My Title"
console.log('Hello World');
```You can highlight specific lines by adding [!code highlight].
```tsx
<div>Hello World</div> // [\!code highlight]
<div>Hello World</div>
<div>Goodbye</div>
<div>Hello World</div>
```You can highlight a specific word by adding [!code word:<match>].
```js
// [\!code word:config]
const config = {
reactStrictMode: true,
};
``````ts
console.log('hewwo'); // [\!code --]
console.log('hello'); // [\!code ++]
```console.log('hewwo');
console.log('hello'); You can use code blocks with the <Tab /> component.
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
<Tabs items={['Tab 1', 'Tab 2']}>
<Tab value='Tab 1'>
```ts
console.log('A');
```
</Tab>
<Tab value=
Note that you can add MDX components instead of importing them in MDX files.
console.log('A');Write Typescript codeblocks with hover type information and detected types errors.
Not enabled by default. See Twoslash.
All built-in content sources handle images properly.
Images are automatically optimized for next/image.

Some optional plugins you can enable.
Write math equations with TeX.
```mdx
f(x) = x * e^{2 pi i \xi x}
```f(x) = x * e^{2 pi i \xi x}To enable, see Math Integration.
Generate code blocks for installing packages via package managers (JS/Node.js).
```mdx
npm i next -D
```npm i next -DTo enable, see Remark Install.
You can see a list of plugins supported by Fumadocs.
Join the community
Subscribe to our newsletter for the latest news and updates
console.log('B');