Sleep
Written By Calm Editorial Team
Clinically reviewed by Dr. Chris Mosunic, PhD, RD, CDCES, MBA
So you love your partner, but sharing a bed with them is ruining your much needed sleep? We got you. Here are 7 tips to get better sleep (and keep the love).
Loving your partner and loving your sleep don’t always go hand in hand. While sharing a bed can bring you closer emotionally, it can also create real challenges when it comes to getting quality rest. Maybe your partner snores, or they toss and turn all night, or maybe you just can’t sync up your sleep schedules. Whatever the reason, not being able to sleep well next to someone you care about can leave you feeling frustrated, exhausted, and maybe even a little guilty.
If you’re unsure what to do, it’s helpful to remember that you’re not alone in feeling this way — plenty of couples struggle with co-sleeping. The good news is that with some small adjustments and open communication, you may be able to find a solution that works for both of you.
6 reasons you might not be sleeping well with your partner
There are several reasons why sharing a bed with your partner might be causing sleepless nights. Getting to the bottom of the root cause(s) can help you find solutions that work for both of you.
1. Different sleep schedules: If you have differing sleep schedules due to work schedules, or personal preferences, co-sleeping can get tricky. When your partner goes to bed late or wakes up early, it might disrupt your sleep, especially if they move around or turn on lights.
2. Snoring: Snoring is one of the most common reasons couples struggle to sleep well together. It’s hard to stay asleep when your partner is snoring loudly, and earplugs can only do so much.
3. Body heat: Sharing a bed means sharing body heat, and some people naturally run warmer than others. If your partner tends to overheat—or if you're both warm sleepers—this can lead to a lot of tossing and turning.
4. Restlessness: If your partner moves a lot in their sleep, you might be woken up several times during the night. This can be especially hard if you’re a light sleeper.
5. Different mattress preferences: Some couples differ on their desired mattress firmness or softness. If the bed doesn’t meet both of your comfort needs, one (or both) of you might not sleep well.
6. Sleep disorders: Sometimes, sleep problems are more serious, like sleep apnea or restless leg syndrome. These conditions can not only disrupt your partner’s sleep but yours as well.
How to get better sleep with a partner: 7 mindful tips when you can’t sleep well
Once you understand what’s keeping you up at night, it’s time to make changes that can help both you and your partner stay close without losing out on sleep. Here are seven tips to help you work towards a better nights (co)sleep.
1. Communicate about your sleep needs to find solutions
The first step to finding a solution to a problem is talking about it. So talk openly with your partner about what’s going on. Be honest, but kind. Explain how your sleep is being affected and how important it is to fix it — for both of you. They might not even realize their habits are keeping you awake. Approach the conversation as a team and focus on solving the problem together. These seven tips for communicating your needs in a relationship can help.
💙 Explore the principles of Kind Communication from our Love and Relationships series to bring into your conversation about sleep.
2. Invest in a bigger or customizable bed for better quality sleep
If you’re finding that your partner’s movements are waking you up or you both feel cramped in your bed, upgrading to a bigger mattress could make a big difference. A king-size bed gives you more room to spread out, making it less likely you’ll disturb each other. If one of you prefers a softer or firmer bed, look into customizable mattresses where each side can be adjusted to different levels of firmness. This way, both of you can get comfortable without having to compromise on sleep quality.
3. Try white noise or earplugs to reduce noise
If sounds like snoring or early alarms are keeping you awake, white noise machines or soundscapes can help. White noise creates a consistent sound that can block out sudden noises, like snoring, and help your brain relax. Earplugs are another simple option for blocking out noise. Some couples even find that using noise-canceling headphones for a bit before bed helps create a calmer environment.
💙 Try the Calm Noise soundscape—a blend of white, green, pink, and brown noise—to help you sleep through the night.
4. Use separate blankets and avoid overheating
If you or your partner are constantly tugging the blanket back and forth all night, using separate blankets can be a game-changer. Instead of fighting for the covers or waking up cold in the middle of the night, you can each have your own blanket and sleep peacefully. This is especially helpful if one of you gets too hot or cold easily — each person can choose a blanket that works for their needs without disrupting the other.
5. Establish a wind-down routine together to get in sync
Having a shared bedtime routine can make it easier to unwind at the same time. This could be as simple as dimming the lights, turning off screens, and reading or listening to music before bed. You could try calming activities like deep breathing exercises, stretching, or using calming essential oils to relax. Creating a peaceful routine together (these nine tips are a good place to start) can help both of you feel more connected and ready for sleep, even if your schedules don’t always match up perfectly.
💙 Try settling down with the Evening Wind Down session from the Daily Move with Mel Mah.
6. Limit screen time before bed to sleep more soundly
It’s easy to get into the habit of scrolling on your phone or watching TV right before bed, but screens emit blue light that can mess with your sleep cycle. If your partner’s screen time is keeping you awake, consider agreeing on a no screens in bed rule or setting a time to shut off devices before bed. You can also invest in blue light blocking glasses, which help reduce the effect of screen time on your ability to fall asleep.
💙 Concerned you might be addicted to your phone? Explore our masterclass
7. Adjust room temperature to optimize your co-sleeping environment
Temperature can play a huge role in sleep quality. If you and your partner can’t agree on the right room temperature, try meeting in the middle or using sleep tools that allow you both to get comfortable. If you’re a warm sleeper, try adding a fan or using a cooling mattress pad to regulate your temperature. If you’re always cold, consider using an electric blanket or heated mattress pad on your side of the bed. Finding the right balance can make a big difference in your comfort and overall sleep quality.
When to consider sleeping in separate bedrooms
Sometimes, despite your best efforts, sleeping together just doesn’t work out — and that’s okay! There’s a growing number of couples who find that sleeping in separate bedrooms helps them get the rest they need without putting their relationship at risk. In fact, many people report that having separate sleeping arrangements actually improves their relationship because they’re both well-rested and less irritable during the day.
If you’ve tried adjusting your sleep routine and environment but you’re still struggling, it might be time to consider sleeping apart. Ask yourself:
Does your partner’s sleep disorder, like sleep apnea or restless leg syndrome, constantly wake you up?
Do you have opposite sleep schedules that are impossible to sync up?
Are you both feeling resentful or frustrated because of lack of sleep?
When considering separate bedrooms, it’s important to approach the topic with care. Let your partner know that sleeping apart doesn’t mean you’re drifting apart emotionally. Making this change is about making sure you’re both rested and healthy so you can enjoy your time together more during the day. For many couples, this simple change can lead to a better night’s sleep and a stronger relationship.
Can't sleep well with partner FAQs
Can different sleep positions help with better co-sleeping?
Yes, changing up your sleep positions can help make co-sleeping more comfortable. Finding the right sleep position is about trial and error, so be patient as you figure out what works best for both of you.
If your partner’s snoring is keeping you up, suggest they try sleeping on their side, as this can often reduce snoring.
A body pillow between you can create some extra space without making either of you feel distant.
Experiment with different styles of pillow to find ones that offer good neck and head support, especially if either of you tends to wake up with stiffness or discomfort. Here are the best type of pillows for all sleeping positions.
Raise the head of the bed slightly — some people find that sleeping in a slightly upright position can help with breathing issues like snoring or acid reflux.
Is it normal to not be able to sleep next to your partner?
Just because you love your partner and enjoy spending time with them doesn’t mean your sleep habits will naturally match up. Everyone has their own preferences when it comes to sleep, whether it’s how much space they need, how warm or cool they like to be, or how much noise they can tolerate.
Your partner might snore, move around a lot, or have a different sleep schedule, all of which can affect your ability to get restful sleep. This doesn’t mean something is wrong with your relationship, it’s just a matter of finding solutions that work for both of you so you can sleep well and stay connected.
How do I bring up the idea of sleeping separately without hurting my partner’s feelings?
Talking about sleeping separately can feel awkward, but it doesn’t have to hurt your partner’s feelings if you approach the conversation with care.
Be honest: Explain that this isn’t about pulling away from them emotionally — it’s about making sure both of you get the rest you need to feel good and function well during the day.
Be clear: Tell them how your sleep has been affected and how important sleep is for your overall health and mood. Keep the conversation positive and focused on improving your wellbeing as a couple.
Share the solution: Frame the conversation as a solution to a practical problem, not a reflection of your relationship or how much you care about each other.
Try alternative intimacies: Suggest spending time together before bed, like watching a show or cuddling, and then going to your own spaces to sleep. Some couples even have occasional “sleepovers” in each other’s rooms to keep that closeness while still getting the benefits of separate sleeping arrangements when needed.
Is it normal for couples to have separate sleep schedules?
Not everyone’s internal clock works the same way. Some people are naturally night owls who feel more awake in the evenings, while others are early birds who love to get up with the sunrise. Your job, hobbies, or even your natural energy levels can also affect when you feel most ready for sleep. If you and your partner have very different schedules, it’s important to find ways to respect those differences while still making time for each other.
Find moments to connect, even if you’re not going to bed or waking up at the same time. You could spend some time together in the evening, even if one of you heads to bed earlier. Or, you might cuddle in the morning, even if one of you then stays in bed longer. It’s all about balancing your need for rest with your need for connection.
As long as you communicate and stay mindful of each other’s needs, different sleep schedules don’t have to be a problem for your relationship.
What should I do if my partner's snoring is causing constant sleep disruption?
Snoring can definitely be a major sleep disruptor, but there are ways to manage it.
It’s important to talk with your partner as they might not even be aware that their snoring is keeping you awake — gently letting them know can be the first step toward finding a solution.
Suggest they see a doctor if their snoring is loud or frequent, as this could be a sign of a more serious issue like sleep apnea.
White noise machines, earplugs, or noise-canceling headphones can help drown out the sound of snoring, giving you a better chance of staying asleep.
Encourage your partner to try different sleep positions, such as sleeping on their side, which can help reduce snoring.
If their snoring continues to be a problem, consider whether separate sleeping arrangements might be a temporary solution, especially if it’s starting to affect your health and mood.
Calm your mind. Change your life.
Mental health is hard. Getting support doesn't have to be. The Calm app puts the tools to feel better in your back pocket, with personalized content to manage stress and anxiety, get better sleep, and feel more present in your life.
` const popupFortyOffHtml = `
Limited Time Offer! 40% off Calm Premium
- 50,000+ minutes of premium content
- New guided content every week
- Cancel anytime
Get Calm Premium
` const popupEmailHtml = `
Sign up for free tips to sleep more and feel better
- Exclusive discounts to Calm Premium
- Free newsletter with tips and content to help with your mental health journey
Thank you! Your submission has been received!
Something went wrong while submitting the form. Try again.
By clicking Submit, you consent to receiving marketing and informational messages from Calm about its products and services.
`const handlePopup = () => {if (document.documentElement.scrollTop >= (height * percentOfPage)) {scrollDistance = window.pageYOffsetpopup.classList.add('active')overlay.classList.add('active')body.classList.add('popup-active')body.style.top = `${scrollDistance * -1}px` if (typeof amplitude != 'undefined') { amplitude.track(`Blog : Popup CTA : Seen`, { page_name: currentPath, calm_user_id: null, cta_name: `${popupName} Popup` }); }}}const handleClosePopup = (dismissEvent) => {popup.classList.remove('active')overlay.classList.remove('active')body.classList.remove('popup-active')body.style.top = nullwindow.scrollBy(0, scrollDistance); if (typeof amplitude != 'undefined' && dismissEvent) { amplitude.track(`Blog : CTA : Clicked`, { page_name: currentPath, calm_user_id: null, cta_name: `${popupName} Popup Dismiss` }); }document.removeEventListener('scroll', handlePopup) popupShownCurrentTab = truedocument.cookie = 'calmblogtrial=1; max-age=31536000; path=/;'localStorage.setItem('calmblogtrial', 1)}const popupInit = (popupHtml, popupEventName) => { popupName = popupEventNamedocument.body.insertAdjacentHTML('afterbegin', popupHtml)popup = document.getElementById('popup')overlay = document.getElementById('popupOverlay')const closeBtn = document.getElementById('closePopupBtn') const popupLinks = document.querySelectorAll('.popup-link')document.addEventListener('scroll', handlePopup)overlay.addEventListener('click', () => handleClosePopup(true))closeBtn.addEventListener('click', () => handleClosePopup(true)) popupLinks.forEach(link => { link.addEventListener('click', () => { if (typeof amplitude != 'undefined') amplitude.track(`Blog : CTA : Clicked`, { page_name: currentPath, calm_user_id: null, cta_name: `${popupName} Popup Success` }); handleClosePopup(false) }) })} if ( !popupAlreadyShown && currentPath !== '/blog' && currentPath !== '/blog/how-to-lower-cortisol' && currentPath !== '/blog/calm-app-updates-summer-2024' ) { popupInit(popupFortyOffHtml, '40_Off') } // web2app block // Step 1: Detect if the user is on a mobile device var isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent) || (window.innerWidth <= 768); if (isMobile) { // Steps 2 and 3: Generate OneLink URL and prepare the HTML snippet (Mobile Only) var oneLinkURL = "https://calm.onelink.me/msVo"; var webReferrer = "af_sub1"; var mediaSource = { defaultValue: "calm_blog" }; var campaign = { defaultValue: currentPath }; var custom_ss_ui = { paramKey: "af_ss_ui", defaultValue: "true" }; var newUrl = window.AF_SMART_SCRIPT.generateOneLinkURL({ oneLinkURL: oneLinkURL, webReferrer: webReferrer, afParameters: { mediaSource: mediaSource, campaign: campaign, afCustom: [custom_ss_ui] } }).clickURL; const htmlSnippet = `
Start your 14-day free trial of Calm Premium.
Full access to 50,000+ minutes of content and tools
Guided courses and plans to help you reach your specific goals
Personalized recommendations based on your preferences
Gentle reminders to help you build a practice
Download App for Free
`; // Step 4 (Mobile): Find and replace all 'trial-cta' elements const trialCtaElements = document.querySelectorAll('.trial-cta:not(#popup)'); if (trialCtaElements.length) { trialCtaElements.forEach(function(element) { element.outerHTML = htmlSnippet; }); } else { // Step 5 (Mobile Only): Handle case where 'trial-cta' is not found const targetElement = document.querySelector('.blog-item-content .sqs-block.html-block.sqs-block-html'); if (targetElement) { targetElement.insertAdjacentHTML('afterend', htmlSnippet); } } } // Email form code var customHTML = `
Stress less, sleep more, and feel better with Calm.
Find out how Calm can support you on your mental health journey.
Thank you! Your submission has been received!
Something went wrong while submitting the form. Try again.
By clicking Submit, you consent to receiving marketing and informational messages from Calm about its products and services.
` var targetElement = document.querySelector('.sections'); if (targetElement) { targetElement.insertAdjacentHTML('afterend', customHTML); } // Email form success/error emailFormHandler() // Harry Styles Audio Sample const excludedPaths = ['/blog/calma-sutra-sleep-positions','/blog/kevin-bacon-dream-boat','/blog/calm-calendars','/blog/abcs-minding-your-mind-dr-rheeda-walker','/blog/feelings-journal','/blog/work-better-workbook','/blog/school-of-calm','/blog/mental-health-screening'] const includedPaths = [] // if (excludedPaths.includes(currentPath) || currentPath.includes('content/de')) { // return; // Exit the script if the current URL is in the excluded list // } if (includedPaths.includes(currentPath)) { // Turn off audio sample for all posts const blogWrapper = document.querySelector('.col.sqs-col-12.span-12'); if (blogWrapper) { const allRows = [...blogWrapper.querySelectorAll('.row.sqs-row')]; const filteredRows = allRows.filter(row => row.querySelector('img') && row.querySelector('a')); const newHtml = `
Listen to the full audio on Calm, the #1 app for sleep, meditation and relaxation
Fall asleep and fall in love with the dreamy voice of Harry Styles.
Try Calm for Free
`; if (filteredRows.length > 0) { const secondFilteredRow = filteredRows[1]; secondFilteredRow.insertAdjacentHTML('afterend', newHtml); secondFilteredRow.style.display = 'none'; } else { const htmlBlockDiv = blogWrapper.querySelector('.sqs-block.html-block.sqs-block-html'); if (htmlBlockDiv) { htmlBlockDiv.insertAdjacentHTML('afterend', newHtml); } } } // Harry Styles Tracking Code // Function to extract a specific part of the URL slug function getSlugPart() { var path = window.location.pathname; // Get the pathname of the URL var slug = path.split('/').pop(); // Split the pathname by '/' and get the last part return slug || 'Unknown'; // Return the slug part or 'Unknown' if it's not available } // Function to set UTM parameters on the specified button/link function setUTMParameters() { var slugPart = getSlugPart(); // Get the specific part of the slug var buttonLink = document.getElementById('harry-styles-sleep-story-cta-button'); // Select the button/link with the specified ID if (buttonLink) { var originalUrl = buttonLink.href; var utmParameters = `utm_source=blog&utm_campaign=${encodeURIComponent(slugPart)}&utm_medium=organic`; // UTM parameters with the slug part var separator = originalUrl.includes('?') ? '&' : '?'; // Determine if we need to start with '?' or append with '&' buttonLink.href = `${originalUrl}${separator}${utmParameters}`; // Append UTM parameters to the URL } } setUTMParameters(); // Execute the function when the page loads } // Quiz Flow Tracking Code // Define the lists of allowed URLs for each HTML snippet var allowedUrlsSnippet1 = ['/blog/coffee-nap','/blog/your-child-wont-sleep','/blog/introducing-liminal-sleep-by-sigur-ros','/blog/sunday-night-sleep-troubles','/blog/sleep-tracking-orthosomnia','/blog/bedtime-yoga','/blog/screen-time-before-bed','/blog/view-from-above','/blog/golf-best-sport-to-cure-insomnia','/blog/power-nap','/blog/afternoon-slump','/blog/sleep-myths-tips-to-optimize-sleep','/blog/the-trail-to-machu-picchu','/blog/wild-sweden','/blog/sleep-paralysis','/blog/how-to-prevent-nightmares','/blog/black-rest-brittney-oliver-black-history-month','/blog/7-sleep-myths-busted','/blog/sleep-languages','/blog/sleep-schedule-in-flux','/blog/waking-up-tired','/blog/the-jk-rowling-of-slow-literature-worlds-first-sleep-storyteller-in-residence-joins-calm','/blog/the-temples-of-shodoshima','/blog/wind-down-time','/blog/de-stressing-work-travel','/blog/how-to-become-a-morning-person','/blog/revenge-bedtime-procrastination','/blog/racing-thoughts-at-night','/blog/wild-nights-sleep','/blog/how-to-get-more-deep-sleep','/blog/sleep-superpower-playbook','/blog/magic-of-yurts','/blog/drift-off-to-sleep-with-harry-styles','/blog/the-last-storytellers','/blog/why-do-i-keep-waking-up-at-3am','/blog/the-10-most-widely-held-myths-and-why-theyre-wrong','/blog/what-is-green-noise','/blog/jerome-flynn-chooses-mindfulness-over-the-sword','/blog/how-to-wake-yourself-up','/blog/what-is-the-best-environment-for-sleep','/blog/the-black-pearls-of-tahiti','/blog/tips-for-women-with-insomnia','/blog/tik-tok-tale','/blog/once-upon-a-time-in-bavaria','/blog/middle-of-the-night-insomnia','/blog/bedtime-challenge','/blog/stephen-fry-sleep-story-blue-gold','/blog/the-healing-practices-of-poetry-and-meditation','/blog/baa-baa-land-premiere','/blog/the-river-wild','/blog/a-cure-for-insomnia-lulled-to-sleep-by-cricket-the-game-not-the-insect','/blog/dia-de-muertos','/blog/why-do-we-dream','/blog/vivid-dreams','/blog/sleep-anxiety','/blog/coffee-nap','/blog/lost-grimm-fairy-tale-is-first-ai-bedtime-story','/blog/dream-journal','/blog/best-music-to-fall-asleep-to','/blog/soothe-yourself-to-sleep-with-the-shipping-news','/blog/sloths-are-the-worlds-greatest-sleep-and-relaxation-ambassadors','/blog/sleep-mist','/blog/the-thinking-behind-sleep-stories']; var allowedUrlsSnippet2 = ['/blog/benefits-of-silence','/blog/high-functioning-anxiety','/blog/journaling-for-anxiety','/blog/eco-anxiety-coping-tips','/blog/what-is-asmr','/blog/music-to-relieve-stress','/blog/5-4-3-2-1-a-simple-exercise-to-calm-the-mind','/blog/how-to-meditate-for-anxiety','/blog/emotional-stress','/blog/how-to-stay-calm-under-pressure','/blog/relaxation-ideas','/blog/panic-attack-vs-anxiety-attack','/blog/how-to-calm-your-mind','/blog/box-breathing','/blog/driving-anxiety','/blog/panic-attack-meditation','/blog/holiday-stress','/blog/difference-between-stress-and-anxiety','/blog/postpartum-anxiety','/blog/tips-for-managing-stress','/blog/ai-anxiety-tips','/blog/anticipatory-anxiety','/blog/3-3-3-rule-anxiety','/blog/grounding-techniques','/blog/vacation-anxiety'] var allowedUrlsSnippet3 = ['/blog/when-saying-no-is-the-nicest-thing-you-can-do','/blog/celebrate-black-history-month-with-renowned-jazz-writer-and-cultural-critic-greg-thomas','/blog/october-2021-calm-calendar','/blog/focused-meditation','/blog/emergency-calm-how-to-calm-down-in-2-minutes','/blog/mindful-movement-challenge','/blog/meditation-for-sleep','/blog/a-grateful-heart','/blog/february-2022-calm-calendar','/blog/november-2022-calm-calendar','/blog/august-2021-calm-calendar','/blog/calm-classrooms-free-mindfulness-training-tools-for-every-teacher-in-the-world','/blog/abc-minding-your-mind-dr-rheeda-walker','/blog/march-is-all-about-sleep','/blog/mindfulness-meditation-for-mental-health','/blog/accepting-lifes-imperfections','/blog/3-tips-for-a-stress-free-thanksgiving','/blog/a-loving-kindness-meditation','/blog/try-these-tips-for-a-stress-free-daily-commute-to-work','/blog/january-2022-calm-calendar','/blog/how-to-sleep-better-guide','/blog/holdingstrong','/blog/5-simple-tips-to-make-meditation-a-daily-habit','/blog/disney-princess-mindful-wisdom','/blog/thanksgiving','/blog/the-story-behind-peacebunny-island','/blog/january-2023-calm-calendar','/blog/running-meditation','/blog/march-2023-calm-calendar','/blog/how-to-hack-holiday-stress-and-anxiety','/blog/why-you-cant-put-down-your-phone','/blog/20-ways-to-take-a-mindful-break','/blog/december-2022-calm-calendar','/blog/5-mindfulness-practices-to-help-reduce-anxiety','/blog/are-affirmations-wearing-you-down','/blog/get-out-of-your-head-and-into-your-life-with-septembers-mindful-living-calendar','/blog/time-and-how-to-spend-it','/blog/june-2023-calm-calendar','/blog/januarys-upcoming-daily-calm-meditations','/blog/5-ways-to-improve-your-sleep-with-mindfulness-practices','/blog/is-it-okay-to-lie-down-while-meditating','/blog/september-2023-calm-calendar','/blog/september-2021-calm-calendar','/blog/how-to-be-more-present','/blog/july-2023-calm-calendar','/blog/july-2021-calm-calendar','/blog/the-expansive-joy-of-doing-nothing','/blog/floating-with-floridas-manatees','/blog/put-yourself-at-the-top-of-your-to-do-list-with-augusts-mindful-living-calendar','/blog/30-days-of-gratitude','/blog/how-to-use-meditation-to-manage-chronic-pain','/blog/august-2022-calm-calendar','/blog/how-to-embrace-uncertainty','/blog/how-to-meditate-in-bed','/blog/mindful-eating-journal','/blog/no-excuses-guide-to-meditation','/blog/2019-daily-calm-calendar-2','/blog/-new-thomas-friends-kids-meditations-and-sleep-story','/blog/workplace-anxiety-guide','/blog/be-your-valentine','/blog/year-of-calm','/blog/walking-meditation','/blog/how-to-develop-a-meditation-practice','/blog/the-neuroscience-of-meditation','/blog/april-2023-calm-calendar','/blog/introducing-calm-body','/blog/meditation-for-headache','/blog/april-2021-calm-calendar','/blog/how-calm-users-fit-meditation-into-daily-routine','/blog/happy-international-womans-day','/blog/courageously-meet-your-life-with-julys-mindful-living-calendar','/blog/the-10-greatest-bob-ross-quotes-of-all-time','/blog/the-gift-of-meditation-for-kids-by-mallika-chopra','/blog/mindfulness-based-stress-reduction','/blog/april-2022-calm-calendar','/blog/july-2022-calm-calendar','/blog/september-2022-calm-calendar','/blog/5-simple-ways-to-practice-mindfulness-in-daily-life','/blog/every-workplace-can-have-a-mindfulness-space','/blog/take-care-of-your-mental-health-with-octobers-mindful-living-calendar','/blog/august-2023-calm-calendar','/blog/mindful-eating','/blog/yearofcalm-deepen-your-awareness-6pp7t','/blog/a-weeklong-trip-with-jeff-warren','/blog/what-is-flow-state','/blog/decembers-upcoming-daily-calm-meditations','/blog/deep-meditation','/blog/march-2022-calm-calendar','/blog/how-to-meditate-in-eleven-steps','/blog/how-to-change-habits-mindfully','/blog/june-2021-calm-calendar','/blog/embrace-the-moment','/blog/june-2022-calm-calendar','/blog/the-benefits-of-mindful-eating','/blog/mental-health-awareness-month-jeff-warren','/blog/what-to-focus-on-when-meditating','/blog/dear-2019','/blog/5-ways-to-improve-your-focus-and-productivity','/blog/free-resources','/blog/cultivate-a-sense-of-wonder-this-april','/blog/2020-daily-calm-calendar','/blog/inner-peace','/blog/meditative-state','/blog/a-month-of-loving-kindness','/blog/body-scan','/blog/shift-your-thinking-how-to-handle-a-negative-mind','/blog/october-2022-calm-calendar','/blog/november-2021-calm-calendar','/blog/self-care-holiday-season','/blog/how-to-start-meditating-daily','/blog/december-2021-calm-calendar','/blog/mindfulness-exercises','/blog/march-2021-calm-calendar','/blog/announcing-the-daily-trip','/blog/may-2021-calm-calendar','/blog/february-2023-calm-calendar','/blog/dealing-with-grief','/blog/happiness-does-not-come-from-headstands','/blog/wandering-mind','/blog/meditations-for-pain-and-sleep-by-oren-jay-sofer-available-exclusively-in-the-calm-app','/blog/2021-calm-calendar','/blog/4-ways-to-soften-loneliness','/blog/shinzen-young-develops-meditations-for-pain-performance-anxiety-and-daily-life-available-exclusively-in-the-calm-app','/blog/mindfulness-for-kids','/blog/my-morning-routine','/blog/junes-mindful-living-calendar-is-about-nourishing-relationships','/blog/may-2022-calm-calendar','/blog/february-2021-calm-calendar','/blog/may-2023-calm-calendar','/blog/gratitude-exercises','/blog/two-things-i-did-wrong-when-i-started-meditating']; // Define the HTML snippets var snippetHTML1 = `
What do you find difficult about sleep?
`; // Replace with actual HTML content var snippetHTML2 = `
How does stress show up for you?
`; // Replace with actual HTML content var snippetHTML3 = `
How often do you meditate?
`; // Replace with actual HTML content // Function to append HTML and add close functionality function appendHtmlAndAddCloseFunctionality(htmlSnippet, targetClass) { var targetElement = document.querySelector(targetClass); if (targetElement) { targetElement.insertAdjacentHTML('beforebegin', htmlSnippet); var closeButton = targetElement.previousElementSibling.querySelector('.quiz-close'); if (closeButton) { closeButton.addEventListener('click', function(event) { event.preventDefault(); targetElement.previousElementSibling.remove(); }); } } } // Append snippet 1 if (allowedUrlsSnippet1.includes(currentPath)) { appendHtmlAndAddCloseFunctionality(snippetHTML1, '.content'); } else if (allowedUrlsSnippet2.includes(currentPath)) { appendHtmlAndAddCloseFunctionality(snippetHTML2, '.content'); } else if (allowedUrlsSnippet3.includes(currentPath)) { appendHtmlAndAddCloseFunctionality(snippetHTML3, '.content'); } else if (currentPath.includes('journey-redirect')) { let meta = document.createElement('meta') meta.name = 'robots' meta.content = 'noindex' document.head.appendChild(meta) } else { appendHtmlAndAddCloseFunctionality(snippetHTML2, '.content') } // Quiz Flow Tracking Code // Function to extract a specific part of the URL slug function getSlugPart() { var path = window.location.pathname; // Get the pathname of the URL var slug = path.split('/').pop(); // Split the pathname by '/' and get the last part return slug || 'Unknown'; // Return the slug part or 'Unknown' if it's not available } // Function to set UTM parameters on elements with the class 'quiz-link' function setUTMParameters() { var slugPart = getSlugPart(); // Get the specific part of the slug var quizLinks = document.querySelectorAll('.quiz-link'); // Select all elements with the class 'quiz-link' quizLinks.forEach(function(link) { var originalUrl = link.href; var utmParameters = `utm_source=blog&utm_campaign=${encodeURIComponent(slugPart)}&utm_medium=organic`; // UTM parameters with the slug part var separator = originalUrl.includes('?') ? '&' : '?'; // Determine if we need to start with '?' or append with '&' link.href = `${originalUrl}${separator}${utmParameters}`; // Append UTM parameters to the URL }); } setUTMParameters(); // Execute the function when the page loads // Continue reading let cutoffBtn const eventProperties = { page_name: currentPath, calm_user_id: null } const allowedUrls = [] if (allowedUrls.includes(currentPath)) { // Article cutoff const contentWrapperRow = document.querySelector('.blog-item-content .sqs-row'); const contentWrapperCol = contentWrapperRow.querySelector('.sqs-col-12'); const cutoffBtnHtml = `
` if (contentWrapperRow && contentWrapperCol) { contentWrapperCol.classList.add('cutoff') contentWrapperRow.insertAdjacentHTML('beforeend', cutoffBtnHtml); cutoffBtn = contentWrapperRow.querySelector('.cutoff__btn__btn'); cutoffBtn.addEventListener('click', () => { contentWrapperCol.classList.remove('cutoff') cutoffBtn.parentElement.remove() if (typeof amplitude != 'undefined') { amplitude.track('Blog : Continue Reading : Clicked', eventProperties); } }) } } // Paragraphs seen, continue reading button seen const paras = document.querySelectorAll('.blog-item-content p'); const pFirst = paras[0] const pMiddle = paras[Math.round(paras.length / 2)] const pLast = paras[paras.length - 2] const eventStops = { first: false, middle: false, last: false, cutoff: false } function throttle(fn, wait) { var time = Date.now(); return function() { if ((time + wait - Date.now()) < 0) { fn(); time = Date.now(); } } } function isInViewport(element, eventKey) { if (element) { var bounding = element.getBoundingClientRect(); if ( bounding.top >= 0 && bounding.left >= 0 && bounding.right <= (window.innerWidth || document.documentElement.clientWidth) && bounding.bottom <= (window.innerHeight || document.documentElement.clientHeight) && !eventStops[eventKey] ) { eventStops[eventKey] = true return true; } } } const sendEvents = order => { if (order === 'cutoff') { dataLayer.push({'event': 'continue_reading_seen'}) if (typeof amplitude != 'undefined') amplitude.track('Blog : Continue Reading : Seen', eventProperties); } else { dataLayer.push({'event': `${order}_paragraph`}) if (typeof amplitude != 'undefined') amplitude.track(`Blog : Article Scroll : ${capitalizeFirstLetter(order)} Paragraph`, eventProperties); } } const checkParaSendEvent = () => { if (isInViewport(pFirst, 'first')) sendEvents('first'); if (isInViewport(pMiddle, 'middle')) sendEvents('middle'); if (isInViewport(pLast, 'last')) sendEvents('last'); if (isInViewport(cutoffBtn, 'cutoff')) sendEvents('cutoff') } const capitalizeFirstLetter = (string) => { return string.charAt(0).toUpperCase() + string.slice(1); } window.addEventListener('scroll', throttle(checkParaSendEvent, 150)) // Topic Targeted App Audio Track CTAs const ctaToReplace = document.querySelectorAll('img[src*="try-calm-for-free.png"]')[0] const appAudioData = [ { title: 'sleep_quality', html: `
5 tools you need to sleep better tonight
- Improve your sleep with these science-backed tips
- From neuroscientist and sleep expert, Dr. Matthew Walker
- Bite-sized audio lessons for long-term results
Sleep Better
Easy Tips for Better Sleep
Dr. Mathew Walker Neuroscientist and Sleep Expert- Don't Try, and Don't Worry! 4 min
- Your Sleep Type 5 min
- Sleep and Your Mood 4 min
- Your Sleep Environment 4 min
- Sleeping with Your Phone 4 min
Sleep Better
`, urls: ['/blog/vivid-dreams','/blog/how-to-prevent-nightmares','/blog/why-dont-i-remember-my-dreams','/blog/stress-dreams','/blog/waking-up-tired','/blog/how-to-get-more-deep-sleep','/blog/how-to-get-over-jet-lag','/blog/sleep-anxiety','/blog/screen-time-before-bed'] }, { title: 'grounding', html: `
Get grounded in three minutes
- Calm your body and mind using your breath
- From former monk and bestselling author, Jay Shetty
- Short audio practice to help you find balance
Calm Your Mind
Calm Your Mind
`, urls: ['/blog/5-4-3-2-1-a-simple-exercise-to-calm-the-mind','/blog/how-to-stop-intrusive-thoughts','/blog/box-breathing','/blog/driving-anxiety','/blog/grounding-techniques','/blog/how-to-stop-overthinking'] }, { title: 'fall_asleep', html: `
Ready to fall asleep with ease tonight?
- Quiet your mind and body using this guided exercise
- From mindfulness specialist Chibs Okereke
- Soothing audio session to unwind into sleep
Get To Sleep
Get To Sleep
`, urls: ['/blog/racing-thoughts-at-night','/blog/why-do-i-keep-waking-up-at-3am','/blog/breathing-exercises-for-sleep'] }, { title: 'work_stress', html: `
How to beat work stress & burnout like a boss
- Relieve stress and anxiety quickly during the workday
- From stress and burnout specialist, Chibs Okereke
- Short exercises to help you find your calm
Take a Break
Quick Breaks
Chibs Okereke Mindfulness Instructor- Managing Overwhelm 5 min
- 60 Second Reboot 1 min
- Step Away From the Computer 4 min
- Let's Unplug 4 min
Take a Break
`, urls: ['/blog/how-to-recover-from-burnout','/blog/beat-burnout','/blog/sunday-scaries'] }, { title: 'sleep_sounds', html: `
The music you need for better sleep
- Get more restful sleep with delta wave music
- Produced with Binaural Beats, scientifically shown to enhance sleep
- 8 hours of music for deep sleep
Get Deep Sleep
Delta Waves for Deep Sleep
Curated by experts at Calm- Halting Thoughts (Delta 145 Hz - 147 Hz) 60 min
- Slow Release (Delta Binaural) 60 min
- Careful Mind (Delta 83 Hz - 84 Hz) 60 min
- Calm Body (Delta Binaural) 59 min
Get Deep Sleep
`, urls: ['/blog/what-is-green-noise','/blog/sounds-to-help-you-sleep','/blog/best-music-to-fall-asleep-to'] }, { title: 'anxiety', html: `
The 11 anti-anxiety tools you need in your life
- Relieve anxiety with these game-changing tools
- From clinical psychologist & online educator, Dr. Julie Smith
- Bite-sized audio sessions for long-term relief
Overcome Anxiety
Overcome Stress and Anxiety
Dr. Julie Smith Clinical Psychologist and Educator- Calm Your Heart with Deeper Breaths 3 min
- Challenge Your Negative Thoughts 4 min
- Guided Breathing to Release Tension 10 min
- Distance Yourself From Anxious Thoughts 5 min
- Create Emotional Safety 4 min
Overcome Anxiety
`, urls: ['/blog/panic-attack-vs-anxiety-attack','/blog/how-to-calm-anxiety-attack','/blog/breathing-exercises-for-anxiety','/blog/feeling-anxious-for-no-reason','/blog/flight-anxiety-tips','/blog/affirmations-for-anxiety'] }, { title: 'relationships', html: `
How to cultivate happier and healthier relationships
- Strengthen your connections (even during conflict)
- From the Head of Mindfulness at Calm
- 12 audio sessions to create lasting change
Improve Your Relationships
Relationships with Others Series
Tamara Levitt Head of Mindfulness at Calm- Nurturing Relationships 10 min
- Holding Space 10 min
- Listening 10 min
- Boundaries 10 min
- Empathy 10 min
Improve Your Relationships
`, urls: ['/blog/how-to-overcome-social-anxiety','/blog/questions-to-ask-to-get-to-know-someone','/blog/taking-a-break-in-a-relationship','/blog/anxiety-in-relationships','/blog/long-distance-relationship','/blog/emotional-connection','/blog/first-date-nerves'] } ] appAudioData.forEach(instance => { if (instance.urls.includes(currentPath) && ctaToReplace) { const ctaToReplaceWrapper = ctaToReplace.closest('.sqs-row') if (ctaToReplaceWrapper) { ctaToReplaceWrapper.insertAdjacentHTML('beforebegin', instance.html) ctaToReplaceWrapper.remove() } return } })}); // Audio Sample Functionality Codewindow.onload = function() { // Replace 'audioFileURL' with the direct link to your audio file const audioFileURL = 'https://static1.squarespace.com/static/57b5ef68c534a5cc06edc769/t/65a78d86aa34af6af3428203/1705479566073/SLEP_0184_DreamWithMe_EN_2CH_MK_20230802_HomepageCutdown.mp3/original/SLEP_0184_DreamWithMe_EN_2CH_MK_20230802_HomepageCutdown.mp3'; // Getting the play/pause button by its ID and icons by their IDs const playPauseButton = document.getElementById('harry-styles-sleep-story-play-pause-button'); const playIcon = document.getElementById('harry-styles-sleep-story-play-icon'); const pauseIcon = document.getElementById('harry-styles-sleep-story-pause-icon'); // Check if elements exist if (playPauseButton && playIcon && pauseIcon) { // Initially hide the pause icon pauseIcon.style.display = 'none'; // Creating the audio object const audio = new Audio(audioFileURL); // Event listener for play/pause button playPauseButton.addEventListener('click', function() { if (audio.paused) { audio.play(); playIcon.style.display = 'none'; pauseIcon.style.display = 'block'; } else { audio.pause(); playIcon.style.display = 'block'; pauseIcon.style.display = 'none'; } }); // Dispatch the custom event after the player is ready let e = new Event("amplitudeaudioloaded"); document.dispatchEvent(e); }};
can't sleep well with partner
Calm Editorial Team