OSCR

Immersive NREM2 dreaming preserves subjective sleep depth against declining sleep pressure.

Code ↔ Paper

The paper beside its authors' code: matches between them have not been computed for this paper yet.

Paper

Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Text · 65 lines · 3.1 KB · CC-BY-4.0

  1. This repository contains the data and MATLAB code required to replicate the findings of “Immersive NREM2 dreaming preserves subjective sleep depth against declining sleep pressure” by Michalak, Marzoli, Pietrogiacomi, et al.
  2. If you use this code or data, please cite the associated article and the Zenodo record.
  3. The code was tested using MATLAB 2024b and EEGLAB 2024.2. Other versions may require minor adjustments.
  4. The 'code/' folder contains:
  5. ----------------------------------
  6. MATLAB scripts used to generate the figures reported in the paper.
  7. Main Figures:
  8. - Fig1_reports_distribution: generates the images shown in Figure 1
  9. - Fig2_brainactivity_topoplot: generates the topographic maps and plots shown in Figure 2
  10. - Fig3_effect_of_experience: generates the plots shown in Figure 3
  11. - Fig4_principal_components: generates the plots shown in Figure 4
  12. - Fig5_effect_of_time: generates the plots shown in Figure 5
  13. Supplementary Figures:
  14. - SM_Fig1_exp_reports_dist: generates the plot shown in Supplementary Figure S1
  15. - SM_Fig2_topoplots_dist: generates the topographic plots shown in Supplementary Figure S2
  16. Topographic analyses:
  17. - topo_maineffect: reproduces the voxelwise GLME main-effect analyses
  18. - topo_interaction: reproduces the voxelwise GLME interaction analyses
  19. Additional folders:
  20. - 'functions/': custom MATLAB functions required by the main scripts
  21. - 'external/': third-party MATLAB variables, functions, and toolboxes required by the scripts
  22. External dependencies:
  23. ----------------------------------
  24. The code relies on several external MATLAB resources.
  25. Included (BSD 2-Clause license):
  26. - fdr_bh, source: https://www.mathworks.com/matlabcentral/fileexchange/27418-fdr_bh
  27. - Hatchfill2, source: https://www.mathworks.com/matlabcentral/fileexchange/53593-hatchfill2
  28. Not included (must be downloaded separately):
  29. - EEGLAB, https://sccn.ucsd.edu/eeglab/download.php
  30. - sigstar, link: https://github.com/raacampbell/sigstar
  31. - cbrewer2, link: https://github.com/scottclowe/cbrewer2
  32. - DataViz, link: https://github.com/povilaskarvelis/DataViz
  33. - swa_matlab (function 'swa_channelNeighbours'), link: https://github.com/Mensen/swa-matlab
  34. - Surfing (function 'surfing_clusterize'), link: https://github.com/nno/surfing
  35. The 'derivatives/' folder contains:
  36. ----------------------------------
  37. Precomputed analysis outputs used to generate the figures.
  38. - fulldatatable_10-Nov-2025_w90.mat, Main table containing channel-wise signal power in delta and gamma frequency ranges for each awakening.
  39. - Delta_*_stats_5000_depth.mat, Cluster-corrected topographic analyses with delta power predicting sleep depth.
  40. - Delta_*_stats_5000_sleep.mat, Cluster-corrected topographic analyses with delta power predicting sleepiness.
  41. - Gamma_*_stats_5000_depth.mat, Cluster-corrected topographic analyses with gamma power predicting sleep depth.
  42. - Gamma_*_stats_5000_sleep.mat, Cluster-corrected topographic analyses with gamma power predicting sleepiness.
  43. - Ratio_*_stats_5000_depth.mat, Cluster-corrected topographic analyses with gamma/delta ratio predicting sleep depth.
  44. - Ratio_*_stats_5000_sleep.mat, Cluster-corrected topographic analyses with gamma/delta ratio predicting sleepiness.

README.txt, under CC-BY-4.0 · at the source

Overview

  1. MoMiLab Research Unit, IMT School for Advanced Studies Lucca, Lucca, Italy
  2. Department of Biomedical, Metabolic, and Neural Sciences, University of Modena and Reggio-Emilia, Modena, Italy
  3. Department of General Psychology, University of Padova, Padova, Italy
  4. Cardiovascular Medicine Department, Fondazione Toscana Gabriele Monasterio, Pisa, Italy
  5. Health Science Interdisciplinary Center, Scuola Superiore Sant’Anna, Pisa, Italy
Journal: PLoS biology, volume 24, issue 3, article e3003683
Dates: received 5 September 2025; accepted 18 February 2026; published online 24 March 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1371/journal.pbio.3003683 · PMID 41875080 · PMCID PMC13012497 · OpenAlex W7140177896
Open access: gold, a free copy (OpenAlex)
Status: code verified (how the code is found and verified)
Categories: EEG (modality), human (organism)
Methods: Connectivity, Spectral & time-frequency, Statistics, Smoothing, state filtering, decompositions, Preprocessing, Physiology & signal measures
MeSH: Dreams*, Sleep*, Sleep Stages*, Adult, Electroencephalography, Female, Humans, Male, Sleep, Slow-Wave, Wakefulness, Young Adult (* major topic)
Topic: Sleep and Wakefulness Research (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: Ministero dell'Università e della Ricerca (2022BNE97C, D67G23000060001, R2049C8YN3); European Research Council (948891); Tuscany Health Ecosystem (THE) (ECS_00000017)
Citations: not cited yet (Europe PMC); 62 references in the paper

Abstract

Perceived sleep depth is a key determinant of subjective sleep quality, traditionally thought to reflect unconsciousness and reduced cortical activation. Here, we combined high-density EEG with a serial awakening paradigm during NREM2 (N2) sleep in healthy human participants to examine its neural and experiential correlates. As expected, deeper sleep was associated with reduced cortical activation, reflected in a lower high-to-low frequency power ratio. Yet, this relationship weakened in the presence of dreaming, indicating that immersive conscious experiences may counteract the impact of cortical activation on perceived depth. Indeed, perceived sleep depth was lowest during minimal forms of awareness characterized by a mere sense of presence, and highest during immersive dreaming or deep unconsciousness. Across the night, physiological sleep pressure and subjective sleepiness declined, but perceived sleep depth rose alongside increasing dream immersiveness. These findings challenge the view that the feeling of deep sleep arises solely from reduced brain activity and suggest instead that immersive dreaming may help sustain the subjective experience of deep sleep as homeostatic pressure wanes.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repository

Its files are read in the Code ↔ Paper reader above.

Zenodo 15372992

License: CC-BY-4.0
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Size: 3 files
Software Heritage: not checked
Found in: the text, “Introduction”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 30 September 2026: the link answers (HTTP 200)
  • 30 September 2026: the link answers (HTTP 200)
1 file

The paper's code and data availability statement is in the Data section.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 0 scripts, each with its path and the digest of its content;
  • no match between paragraphs and code yet;
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

No dataset and no data link were found in the paper.

Data Availability

The deidentified data generated in this study and the custom-made MATLAB codes used for data analysis and to reproduce main and supplementary figures and tables presented in this work have been deposited in the Zenodo database (DOI: https://doi.org/10.5281/zenodo.15372992).

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 30 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 12 authors, 11 MeSH terms, 3 funders, 57 references.

Cite

This paper

Michalak, A., Marzoli, D., Pietrogiacomi, F., Bergamo, D., Elce, V., Pedreschi, B., Mosca, G., Navari, A., Emdin, M., Ricciardi, E., Handjaras, G., & Bernardi, G. (2026). Immersive NREM2 dreaming preserves subjective sleep depth against declining sleep pressure. PLoS biology, 24(3), e3003683. https://doi.org/10.1371/journal.pbio.3003683

BibTeX

@article{michalak2026immersive,
author = {Michalak, Adriana and Marzoli, Davide and Pietrogiacomi, Francesco and Bergamo, Damiana and Elce, Valentina and Pedreschi, Bianca and Mosca, Giorgia and Navari, Alessandro and Emdin, Michele and Ricciardi, Emiliano and Handjaras, Giacomo and Bernardi, Giulio},
title = {{Immersive NREM2 dreaming preserves subjective sleep depth against declining sleep pressure}},
journal = {PLoS biology},
year = {2026},
month = mar,
volume = {24},
number = {3},
pages = {e3003683},
publisher = {PLOS},
issn = {1544-9173},
doi = {10.1371/journal.pbio.3003683},
url = {https://doi.org/10.1371/journal.pbio.3003683},
pmid = {41875080},
pmcid = {PMC13012497}
}

RIS

TY - JOUR
AU - Michalak, Adriana
AU - Marzoli, Davide
AU - Pietrogiacomi, Francesco
AU - Bergamo, Damiana
AU - Elce, Valentina
AU - Pedreschi, Bianca
AU - Mosca, Giorgia
AU - Navari, Alessandro
AU - Emdin, Michele
AU - Ricciardi, Emiliano
AU - Handjaras, Giacomo
AU - Bernardi, Giulio
TI - Immersive NREM2 dreaming preserves subjective sleep depth against declining sleep pressure
T2 - PLoS biology
J2 - PLoS Biol
PY - 2026
DA - 2026/03/24
VL - 24
IS - 3
SP - e3003683
SN - 1544-9173
PB - PLOS
DO - 10.1371/journal.pbio.3003683
UR - https://doi.org/10.1371/journal.pbio.3003683
LA - en
ER -

CSL-JSON

{
"id": "10.1371/journal.pbio.3003683",
"type": "article-journal",
"title": "Immersive NREM2 dreaming preserves subjective sleep depth against declining sleep pressure",
"container-title": "PLoS biology",
"author": [
{
"family": "Michalak",
"given": "Adriana"
},
{
"family": "Marzoli",
"given": "Davide"
},
{
"family": "Pietrogiacomi",
"given": "Francesco"
},
{
"family": "Bergamo",
"given": "Damiana"
},
{
"family": "Elce",
"given": "Valentina"
},
{
"family": "Pedreschi",
"given": "Bianca"
},
{
"family": "Mosca",
"given": "Giorgia"
},
{
"family": "Navari",
"given": "Alessandro"
},
{
"family": "Emdin",
"given": "Michele"
},
{
"family": "Ricciardi",
"given": "Emiliano"
},
{
"family": "Handjaras",
"given": "Giacomo"
},
{
"family": "Bernardi",
"given": "Giulio"
}
],
"container-title-short": "PLoS Biol",
"volume": "24",
"issue": "3",
"page": "e3003683",
"DOI": "10.1371/journal.pbio.3003683",
"PMID": "41875080",
"PMCID": "PMC13012497",
"ISSN": "1544-9173",
"publisher": "PLOS",
"URL": "https://doi.org/10.1371/journal.pbio.3003683",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
24
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1038/s41467-025-61945-1 [code]
A dream EEG and mentation database.
Journal: Nature communications
In common: EEG, 9 references, 2 authors
[2] doi:10.1038/s42003-026-09988-y
Thalamic involvement defines distinct slow-wave subtypes in NREM sleep.
Journal: Communications biology
In common: EEG, 7 references, 3 authors
[3] doi:10.1002/hbm.26762 [code]
Sensitivity and specificity of the action observation network to kinematics, target object, and gesture meaning.
Journal: Human brain mapping
In common: 3 authors
[4] doi:10.2147/nss.s506461 [code]
We are the Sensors of Consciousness! A Review and Analysis on How Awakenings During Sleep Influence Dream Recall.
Journal: Nature and science of sleep
In common: 9 references
[5] doi:10.1038/s42003-025-07788-4 [code]
Resilience and vulnerability of neural speech tracking after hearing restoration.
Journal: Communications biology
In common: 2 references, 2 authors
[6] doi:10.1073/pnas.2404213121
Prolonged exertion of self-control causes increased sleep-like frontal brain activity and changes in aggressivity and punishment.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: 1 reference, 2 authors
[7] doi:10.1063/5.0202385 [code]
An open computational toolbox to analyze multi- and single-unit sympathetic nerve activity in microneurography.
Journal: Biophysics reviews
In common: 2 authors
[8] doi:10.1371/journal.pbio.3003060 [code]
Hemispherotomy leads to persistent sleep-like slow waves in the isolated cortex of awake humans.
Journal: PLoS biology
In common: EEG, 7 references
[9] doi:10.1093/pnasnexus/pgaf288
Unveiling the relationship between aesthetic experiences and attention through a cross-experiment validation of their processing biomarkers.
Journal: PNAS nexus
In common: EEG, 4 references, author Giacomo Handjaras
[10] doi:10.1016/j.cub.2025.06.064 [code]
Cortical activity upon awakening from sleep reveals consistent spatio-temporal gradients across sleep stages in human EEG.
Journal: Current biology : CB
In common: EEG, 7 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Add the badge to the code's README

OSCR: the badge of this paper

If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.

Markdown
<!-- oscr-badge:start -->
[![OSCR](https://openscicode.org/badge/doi/10.1371/journal.pbio.3003683.svg)](https://openscicode.org/badge/doi/10.1371/journal.pbio.3003683)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.1371/journal.pbio.3003683.svg
   :target: https://openscicode.org/badge/doi/10.1371/journal.pbio.3003683
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1371/journal.pbio.3003683"><img src="https://openscicode.org/badge/doi/10.1371/journal.pbio.3003683.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->

If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.

Report a mismatch between the code and the paper · Report a code error (signed in)

Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.

Report a reproduction failure (signed in)

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.