A Study to Evaluate the Respiratory Safety of Lemborexant in Adult and Elderly Participants With Moderate to Severe Obstructive Sleep Apnea, and in Adult and Elderly Participants With Moderate to Severe Chronic Obstructive Pulmonary Disease

The primary purpose of the study is to determine whether lemborexant increases the apnea hypopnea index (AHI) on Day 8 of treatment in adult and elderly participants (adults greater than or equal to \[\>=\] 45 to less than \[\<\] 65 years; elderly \>=65 to 90 years) with moderate to severe obstructive sleep apnea (OSA) compared with placebo, and using pulse oximetry determine whether lemborexant decreases the peripheral oxygen saturation (SpO2) during total sleep time (TST) on Day 8 of treatment in adult and elderly participants (adults \>=45 to \<65 years; elderly \>=65 to 90 years) with moderate to severe chronic obstructive pulmonary disease (COPD) compared with placebo.


Eligibility Criteria:
Inclusion Criteria:

1. Male or female, age \>=45 and \<=90 at the time of informed consent
2. Voluntary agreement and ability to provide written informed consent
3. Body mass index (BMI) \<40 Kilogram per meter square (kg/m\^2)
4. Reports habitually sleeping for at least 5.5 hours per night
5. Reports habitual bedtime between 21:00 and midnight
6. Agrees to stay in bed for 7 hours per night for the duration of the study
7. At Screening Visit 2: Has completed the sleep diary for at least 5 consecutive nights
8. At Screening Visit 2: Confirmation of mean habitual bedtime (MHB) between 21:00 and midnight (sleep diary)

   Additional Inclusion Criteria (OSA Cohort)
9. Moderate to severe OSA diagnosed according to the criteria of the ICSD, confirmed by PSG (home sleep testing by portable monitor is acceptable) within the previous 5 years or a repeated PSG during screening
10. On screening PSG: moderate OSA (defined as 15 \<=AHI \<30) or severe OSA (defined as AHI \>=30 per hour)
11. SpO2 \>=94% assessed as part of vital signs at Screening Visit 1

    Additional Inclusion Criteria (COPD Cohort)
12. Screening spirometry performed as per the Global Initiative for Obstructive Lung Disease (GOLD) recommendations
13. On screening spirometry, based on post-bronchodilator Forced Expiratory Volume in 1 second (FEV1):

    • FEV1/Forced Vital Capacity (FVC) \<0.70 and one of the following:
    * 50% \<=FEV1 \<80% predicted (GOLD 2 Classification for moderate COPD) or
    * 30% \<=FEV1 \<50% predicted (GOLD 3 Classification for severe COPD)
14. Moderate to severe COPD according to medical history and screening spirometry as per the GOLD criteria (GOLD 2019)
15. On screening PSG

    * AHI \<15
    * SpO2 during wakefulness \>90% (both supine and sitting)
    * SpO2 during sleep \>=80% for at least 75% of the recording period with no more than five continuous minutes \<80% and with no SpO2 readings \<70%

Exclusion Criteria:

1. Females of childbearing potential
2. A current diagnosis of restless legs syndrome, periodic limb movement disorder, circadian rhythm sleep disorder, or narcolepsy
3. Reports symptoms potentially related to narcolepsy, that in the clinical opinion of the investigator indicate the need for referral for a diagnostic evaluation for the presence of narcolepsy
4. A history of symptoms of rapid eye movement (REM) Behavior Disorder, sleep-related violent behavior, sleep-driving, or sleep-eating, or symptoms of another parasomnia that in the investigator's opinion make the participant unsuitable for the study
5. Periodic Limb Movement with Arousal Index (PLMAI) as measured on the screening

   PSG:
   * Age 18 to \<65 years: PLMAI \>=10
   * Age \>65 years: PLMAI \>15
6. A prolonged QT interval by Fredericia (QTcF) (QTcF \>450 milliseconds \[ms\]) as demonstrated by a repeated electrocardiogram (ECG) at Screening
7. Any suicidal ideation with intent with or without a plan at Screening or within 6 months of Screening (that is, answering "Yes" to questions 4 or 5 on the Suicidal Ideation section of the Columbia-Suicide Severity Rating Scale \[C-SSRS\])
8. Any lifetime suicidal behavior (per the Suicidal Behavior section of the C-SSRS) within 10 years of Screening
9. Evidence of clinically significant disease (example, cardiac, respiratory, gastrointestinal, renal disease) that in the opinion of the investigator(s) could affect the participant's safety or interfere with the study assessments
10. Hypersensitivity to the study drug or any of the excipients
11. Used any prohibited prescription or over-the-counter medications within 1 week or 5 half-lives, whichever is longer, before the screening PSG
12. Any history of or concomitant medical condition that in the opinion of the investigator(s) would compromise the participant's ability to safely complete the study
13. Scheduled for surgery during the study that requires general anesthesia or administration of prohibited medications
14. Psychotic disorder(s) or unstable recurrent affective disorder(s) evident by use of antipsychotics or prior suicide attempt(s) within approximately the last 2 years
15. History of drug or alcohol dependency or abuse within approximately the last 2 years
16. Use of illegal recreational drugs (includes marijuana, regardless of whether prescribed for medicinal use)
17. Currently enrolled in another clinical study or used any investigational drug or device within 28 days or 5\*the half-life, whichever is longer preceding informed consent
18. Previously participated in other clinical trial of lemborexant
19. Exposure within the last 14 days to an individual with confirmed or probable corona virus disease 2019 (COVID-19) or symptoms within the last 14 days that are on the most recent Centers for Disease Control and Prevention (CDC) list of COVID symptoms or any other reason to consider the participant at potential risk for an acute COVID-19 infection

    Additional Exclusion Criteria (OSA Cohort)
20. SpO2 \<80% for \>=5% of TST during the screening PSG
21. Use of a continuous positive airway pressure (CPAP) device or dental appliance within 2 weeks of the screening PSG, and does not agree to abstain from the use of a CPAP device or dental appliance from the
22. Current evidence of a clinically significant, active respiratory disorder other than OSA. This includes bronchiectasis, emphysema, asthma, COPD or any other pulmonary disorder identified by review of medical history, physical examination, and which in the opinion of the investigator, could compromise the participant's safety or interfere with study assessments
23. Current evidence of other clinically significant disease (example, psychiatric disorders, disorders of the gastrointestinal tract, liver, kidney, respiratory system, endocrine system, hematological system, neurological system, cardiovascular system, or a congenital abnormality), malignancy within the past 5 years (other than adequately treated basal cell carcinoma or in situ carcinoma of the cervix), or chronic pain that in the opinion of the investigator could affect the participant's safety or interfere with the study assessments. Screening Visit through the last study visit

    Additional Exclusion Criteria (COPD Cohort)
24. Use of continuous (\>16 hours/day) oxygen therapy
25. Use of oxygen therapy during PSG
26. Determination that, in the opinion of the investigator, removal of oxygen therapy could affect the participant's safety or interfere with the study assessments
27. Recent changes to COPD medications or recent acute exacerbation of COPD (that is, needing hospitalization or treatment with oral corticosteroids and/or antibiotics) within 3 months of enrollment
28. On screening spirometry (COPD only):

    * FEV1/FVC \>=0.70
    * FEV1 \>=80% predicted (GOLD 1 Classification for mild COPD)
    * FEV1 \<30% predicted (GOLD 4 Classification for very severe COPD)
29. On screening PSG (COPD only):

    * Moderate to severe OSA (AHI \>=15)
    * SpO2 \<90% during wakefulness (supine and sitting)
    * SpO2 during sleep \<80% for 25% or more of the recording with \>5 consecutive minutes \<80% and any SpO2 reading \<70%
30. ECG evidence of right ventricular hypertrophy or right heart failure
31. Screening hematocrit \>55%
32. Use of a CPAP device or dental appliance within 2 weeks of the screening PSG, and does not agree to abstain from the use of a CPAP device or dental appliance from the Screening Visit through the last study visit
33. Current evidence of a clinically significant, active respiratory disorder other than COPD and mild OSA. This includes any other pulmonary disorder identified by review of medical history, physical examination, and which in the opinion of the investigator, could compromise the participant's safety or interfere with study assessments.
34. Current evidence of other clinically significant disease other than COPD and mild OSA (example, psychiatric disorders, disorders of the gastrointestinal tract, liver, kidney, respiratory system, endocrine system, hematological system, neurological system, cardiovascular system, or a congenital abnormality), malignancy within the past 5 years (other than adequately treated basal cell carcinoma or in situ carcinoma of the cervix), or chronic pain that in the opinion of the investigator could affect the participant's safety or interfere with the study assessments.